Opening a file, second attempt

Janos Blazi jblazi at
Sat Jul 28 23:35:48 EDT 2001

I'd like to open a file for writing using the function call. But if
the file is already in use, the OS denies access to the file. How do I find
out about this in my Python program? I do tno know the name of the exception
that is raised. I have tried

    if os.access(filename_trunk,os.W_OK)==0:
       print "file not open"

but this does not work, access returns 1, though the file ist not

Janos Blazi

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

More information about the Python-list mailing list