python - python2.7 select data file to rerun file -


i running python/pygame game need 'txt' data file previouse running of game. 'save1.txt' have many files save....txt need able select 1 list possibly using tkinter askdialog update value of 'y' in code snip. code in same directory

i nave been searching can not find suitable example

y = 'save1.txt' r=[0]*10 inputfile = (y,'r') #open(y , 'rb')  in range(0,10):     r[i] = pickle.load(inputfile)   inputfile.close() in range(0,10):         if r[i]== 0:         print i,'ii'         s=i-1     else:         s = 3 


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -