File permissions script vs shell



I'm running python on windows and have a program that watches a
directory and acts on files as they come into the directory. After
processing is complete, i delete the file, or in this case attempt
to....

In the script version I repeatedly get OSError exceptions stating
permission denied when trying to delete or rename

My exception print out...
Files system said no: [Errno 13] Permission denied:
u'D:\\Data\\00-0C-41-DD-87-E5.xml'

But i can go into the python shell and execute...

fileString = 'D:\\Data\\00-0C-41-DD-87-E5.xml'
import os
os.unlink(fileString)

and the file deletes fine

Any ideas? This is on my development windows xp box and i'm the only
user.

Thanks
Jeff

.



Relevant Pages

  • Re: File permissions script vs shell
    ... >> I'm running python on windows and have a program that watches a ... >> In the script version I repeatedly get OSError exceptions stating ... This is on my development windows xp box and i'm the only ... > Traceback: ...
    (comp.lang.python)
  • Re: File permissions script vs shell
    ... > I'm running python on windows and have a program that watches a ... > In the script version I repeatedly get OSError exceptions stating ... This is on my development windows xp box and i'm the only ... Traceback: ...
    (comp.lang.python)
  • Re: Accessing Postgress from Windows
    ... > I am running Python 2.3 on a Windows XP box and would like to access a ... You could try this mxODBC from Windows. ... Robby Russell | Owner.Developer.Geek ...
    (comp.lang.python)
  • Re: pysqlite
    ... Kent Johnson wrote: ... down for a hardware upgrade with no date as to when it will be back. ... I need v 2.x for windows, running python v2.4 ...
    (comp.lang.python)
  • ODBC Connection on Windows XP
    ... I am running Python 2.3 on Windows XP and am trying to connect to an ... ODBC datasource. ... and we are the dreamers of dreams." ...
    (comp.lang.python)