Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. f = open("Input.txt", "r")#opens the file (input.txt)
  2. nf = open("Output.txt", "w")#opens the file (output.txt)
  3. pokeData = []
  4. for line in f:
  5. #print "%r" % line
  6. pokeData.append(line)
  7. num = 0
  8. tab = """ """
  9. newl = """NEWL
  10. """
  11. slash = "/"
  12. while num != 386:
  13. current = pokeData
  14. current.append(line)
  15. print current[num]
  16. for tab in current:
  17. words = tab.split()
  18. for newl in words:
  19. nf.write('%s:{num:%s,species:"%s",types:["%s","%s"],baseStats:{hp:%s,atk:%s,def:%s,spa:%s,spd:%s,spe:%s},abilities:{0:"%s"},{1:"%s"},heightm:%s,weightkg:%s,color:"Who cares",eggGroups:["%s"],["%s"]},\n' % (str(words[2]).lower(),str(words[1]),str(words[2]),str(words[3]),str(words[4]),str(words[5]),str(words[6]),str(words[7]),str(words[8]),str(words[9]),str(words[10]),str(words[12]).replace("_"," "),str(words[12]),str(words[14]),str(words[15]),str(words[16]),str(words[16])))
  20. num = num + 1
  21. # for newl in pokeData:
  22. # print('stamaryllis:{num:10500,species:"Stamaryllis",types:["Grass","Ground"],baseStats:{hp:131,atk:124,def:120,spa:107,spd:101,spe:97},abilities:{0:"Flower Veil"},heightm:1,weightkg:1,color:"Red",eggGroups:["Undiscovered"]},')
  23. nf.close()
  24. f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement