Re[2]: [Tutor] write to a file in linux (again)!

S A buc40@bemail.org
Wed, 21 Aug 2002 12:28:34 -0700


>
>>>> import os
>>>> system("chmod +x filename")
>then open write and close but the problem is i cant change the write
>permissions before a file exists and i cant write a new file without
>having permissions i never had this problem before i was always aloud to
>write files or the files i couldnt write to already existed


This may not be the easiest solution. But you just create the file first. Then you can use the "a" flag when opening to append to the file. 

Also you can use os.chmod to change the file permissions after you first create the blank file and then append to the file.

Good Luck.
SA



"I can do everything on my Mac that I used to do on my PC, plus alot more ..."

-Me

------------------------------------------------------------
Free, BeOS-friendly email accounts: http://BeMail.org/
BeOS News and Community: http://www.BeGroovy.com/


---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------