[Tutor] path to executing .py file

tiefeng wu icebergwtf at gmail.com
Tue Apr 14 04:48:36 CEST 2009

Hello everybody!
I'm working on my code repository (svn) auto-backup script which get hotcopy
of svn repository
directory to a directory named by date in same location where script file
is, it executed by a timer
program every 00:00 clock. Everything works fine when I'm testing by double
click it. But when
auto execute it, I got unexpected behavior. The backup directory will be
created under
"C:\Documents and settings\username". I create backup directory by this way:

os.mkdir(os.getcwd() + arch_dir)

is there some way to get path to my executing script, so I can replaced
"os.getcwd()" in above

And I have another question, I've tried remove a copy of svn repository by


I got error "Access denied!" Is that mean my script has no power to delete
it? Is there some way to
give the right to do that?


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

More information about the Tutor mailing list