How about simple "qwerty.txt", without path, shouldn't it mean the same? What error message are you getting? You should check the return value in variable userfile for the error.
pyTony
pyMod
6,299 posts since Apr 2010
Reputation Points: 879
Solved Threads: 984
Skill Endorsements: 26
1) until you completely understand how paths work in relation to your IDE vs Program, use the full path.
2) You don't check to see if the file was opened. It probably was, just not where you expected. Always error check after anything that might not work.
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 36