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

Watt III, Glenn gwatt3@backbonesecurity.com
Wed, 21 Aug 2002 14:01:11 -0400


-----Original Message-----
From: python [mailto:python@inkedmn.net]
Sent: Wednesday, August 21, 2002 1:50 PM
To: Watt III, Glenn
Cc: tutor@python.org
Subject: Re[2]: [Tutor] write to a file in linux (again)!
>>
>>
>>does the whole path exist already?
>>
>>python will only create files for you, not directories (unless you use
>>os.mkdir() <-- i think that's what it's called).
>>
>>so, the directory you're trying to create a file in must exist before
>>you run this...
>>
>>brett

sorry i was careless with my last message i got an error but it wasnt
the same now i lack the permissions to run the script which i can change
in the linux shell but i am researching how to do throught python i
thinks its=20
>>> 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