Advertisement
Vendily

Python 3.7 skeleton ini pbs batch editor

Feb 18th, 2020
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement