sir wrote:

> My system is :win7+python3.4  .
> 
> I want to write a new file "named names.txt"  in disk f:
> 
>   >>> ff=open(r"F:\names.txt","w")
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> OSError: [Errno 22] Invalid argument: 'F:\\names.txt'

Are you sure that you have an F drive?

Is it a writable disk? e.g. a hard drive, not a CD drive.

Do you have read and write permissions to F drive?


Run this code and show us what it prints:

import os
print(os.stat("F:\\")
print(os.access("F:\\", os.O_RDWR))




-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to