I am running a python/pygame game that i need to get a 'txt' data file from a previouse running of the game. 'save1.txt' I have many files save....txt i need to be able to select 1 from a list possibly using tkinter askdialog to update the value of 'y' in the code snip. all the code is in the same directory
I nave been searching SO but can not find a suitable example
y = 'save1.txt'
R=[0]*10
inputFile = (y,'r') #open(y , 'rb')
for i in range(0,10):
R[i] = pickle.load(inputFile)
inputFile.close()
for i in range(0,10):
if R[i]== 0:
print i,'ii'
S=i-1
else:
S = 3