hello,
i have probably rather simple question. however, i am just starting to use python and it just drives me crazy. i am following the instructions of a book and would like to open a simple text file. the code i am using:
import sys
try:
d = open("p0901aus.txt" , "W")
except:
print("Unsucessfull")
sys.exit(0)
i am either getting the news, that i was unsucessfull in opening the document or pop up appears saying:
(unicode eror) 'unicodeescape' codec can't decode bytes in position 2-4: truncated \UXXXXXXXX escape
i have no clue what the problem is. i tried to save the document in different codes, tried different path...always the same problem
does anybody know any help?
thank you very much in advance,
georg ps: i am using windows vista