When i create and write in a text file using the python code below, it executes successfully. However, when i open the text file, it does not show anything written in it!
newl=[]
print ""
while 1:
tks=raw_input("# ")
if tks=="/":
text=''.join(newl)
print text
filen=open('c:/Users/Admin/Desktop/snickcode.txt', 'w')
filen.write(str(text))
filen.close
print "#saved to desktop, please rename the file before reuse"
print "{non}"
print ""
break
else:
gig=(str(tks))
newl.append(gig)
print newl
print textbefore the file is written. Does it display anything? Also, if nothing is written to the file, how can you say"it executes successfully"? Sounds like it's broken to me!