On Fri, Mar 18, 2011 at 4:56 PM, Jon Herman <jfc.her...@gmail.com> wrote:

> Jack,
>
> thanks.
>
> Alright, so what I did is create a file called hello.txt with a single line
> of text in there. I then did the following:
>
> f="fulldirectory\hello.txt" (where fulldirectory is of course the actual
> full directory on my computer)
> open("f", "w")
>
> And I get the following error: IOError: [Errno 13] Permission denied: 'f'
> If I open to read, I get: IOError: [Errno 2] No such file or directory: 'f'
>
> Can anyone explain to me why this happens?
>
>
You need to remove the quotes from f.  f is a variable name, not a string,
so there should be no quotes around it.

-- 
Jack Trades
Pointless Programming Blog <http://pointlessprogramming.wordpress.com>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to