SHARE
TWEET

Python 3.7 skeleton ini pbs batch editor

Vendily Feb 18th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import configparser
  2.  
  3. with open("pokemon.txt","r",-1,"utf_8") as pbsfile:
  4.   config=configparser.RawConfigParser()
  5.   config.optionxform=str # Must be capitalized, so this is here
  6.   pbsfile.seek(3)
  7.   config.read_file(pbsfile)
  8.   for i in range(1,(493+1)): # This is the range that you want to do. 1 is the start, 439 is the end
  9.     # work with config gets and sets, read the pydocs. super easy
  10.   with open("newpbs.txt","a",-1,"utf_8") as newfile:
  11.     newfile.write('\ufeff') #Dealing with the PBS file
  12.     config.write(newfile,space_around_delimiters=False)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top