[Tutor] path to executing .py file

tiefeng wu icebergwtf at gmail.com
Wed Apr 15 05:10:22 CEST 2009


>
> is there some way to get path to my executing script, so I can replaced
>> "os.getcwd()" in above line?
>>
>
> Look at the recent thread on creating exe files with py2exe.
> Investigate the __file__  variable...


thanks, Alan Gauld. thanks for your patience for such a trivial question:)


> shutil.rmtree(svn_repos_copy_dir)
>>
>> I got error "Access denied!" Is that mean my script has no power to delete
>> it?
>>
>
> More likely the user running the script does not have the correct
> access permissions or someone else is using the repository at
> the time thus locking it.


as I mentioned, that's a COPY of svn repository, I'm sure there's no one
locking it
I tried manually delete it by 'del' and 'rm' under command line, and I got
same error,
but deleting in windows explorer (with same user login as script was called)
with no
problem.

if this question has nothing concerned with this mailing list, I'm sorry an
please ignore it.

tiefeng wu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090415/f53042a4/attachment.htm>


More information about the Tutor mailing list