introCreate.py
Cod:
import os
import app
#import the above lines if you don't have them already
def __randomizeName(self):
dir = os.path.dirname(os.path.abspath("introCreate.py"))
list = open("%s\\nume.list" % dir, "r").read().split("\n")
rng = app.GetRandom(0, len(list)-1)
randomName = list[rng]
self.heroName.SetText("%s" % randomName) ## schimba numele cu ce ai pus tu in nume.list