Can't Write File

Victor Subervi victorsubervi at gmail.com
Tue Nov 10 15:57:30 EST 2009


On Tue, Nov 10, 2009 at 3:41 PM, Rami Chowdhury <rami.chowdhury at gmail.com>wrote:

> On Tue, 10 Nov 2009 12:38:36 -0800, Victor Subervi <
> victorsubervi at gmail.com> wrote:
>
>  Hi;
>> I've determined the problem in a script is I can't open a file to write
>> it:
>> script = open(getpic, "w")  # where getpic is already defined
>> Here are the permissions:
>> -rwxr-xr-x  1 root root  4649 Nov 10 12:31 start.py
>> What am I doing wrong?
>> TIA,
>> Victor
>>
>
> ...and where's the file denoted by getpic?
>

getpic is incremented. For example, it can equal "getpic1.py". I've printed
this out in the except statement, since it's failing the try, so I know it's
working. (When I tried "raise" in the except, because of the way the code
reads, it defaulted to another except and didn't show me the error.)
V

>
>
> --
> Rami Chowdhury
> "Never attribute to malice that which can be attributed to stupidity" --
> Hanlon's Razor
> 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091110/aea1bb9e/attachment-0001.html>


More information about the Python-list mailing list