[Tutor] File Writing Permission?

2007-10-07 Thread David Millar
Hi everyone, 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

Re: [Tutor] File Writing Permission?

2007-10-07 Thread Eric Brunson
David Millar wrote: Hi everyone, 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

Re: [Tutor] File Writing Permission?

2007-10-07 Thread claxo
if os.name == posix: fname = ~/ + fname infile = open(fname,w) you must expand '~' before open: fname = os.path.join('~',fname) fname = os.path.expanduser( fname ) infile = open(fname,'w') ___ Tutor

Re: [Tutor] File Writing Permission?

2007-10-07 Thread David Millar
Thanks - it still took a bit more tweaking because of how I wrote a few things, but the saving works fine now. I've been having trouble with finding a version of the curses library for Windows that I can get working, so I just used os.path.expanduser no matter the system. :/ Dave On 10/7/07,