[Tutor] File Writing Permission?
davmillar at gmail.com
Sun Oct 7 20:53:04 CEST 2007
I'm working on making a Debian package for a game I'm working on, and it
works fine, but I've run into a problem with my script now. The script is
placed in /usr/bin so all users on the system have access, but even though
it will run fine, I can't save files to that directory, so the saving
feature doesn't work and the rest of my game is crippled now. Any ideas on
how I could progress? I tried appending "~/" to the filename for that copy
of the script, but it just makes the terminal window close without warning.
Any help would be appreciated.
# This part isn't necessary, I just wanted to see if it would save to
the user's home folder
if os.name == "posix":
fname = "~/" + fname
infile = open(fname,"w")
# Save the maps
picklelist = [choins, inventory, book, mapchanges, event, cdata]
# Delete the saved maps because they will just get in the way later
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor