[Tutor] path to executing .py file

Alan Gauld alan.gauld at btinternet.com
Tue Apr 14 10:06:22 CEST 2009


"tiefeng wu" <icebergwtf at gmail.com> wrote

> 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...

> 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.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list