Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Win32All - Services and current path

Thread Tools

Win32All - Services and current path

Jeff Hinrichs
Posts: n/a
I'm having trouble nailing down the path to the script directory when
building a service.
I am trying to read in a config file via ConfigParser. When I run the
service in debug mode all is well.
When I start it up normally, via ' start' I can't get the
directory where my service lives.

When starting the service normally the current path when I try to read the
file gets set to:
probably because that is where pythonservice lives. So I can't use
sys.path[0] or parse sys.argv[0]
to find directory where my config file lives. I don't want to hardcode the
path to the config file but
currently that is the only way I can get the ConfigParser object to find my

What am I missing?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows/win32all, unicode and long filenames Neil Hodgson Python 3 08-28-2005 06:59 AM
GetEnhMetaFileHeader API and win32all Roy H. Berger Python 0 11-04-2003 02:48 AM
win32all: buggy IE proxy stuff and execScript() gcash Python 0 08-07-2003 01:21 AM
Re: Win32All Crashes Python 2.3? Mark Hammond Python 2 08-06-2003 05:46 AM
Re: Win32All Crashes Python 2.3? Martin v. =?iso-8859-15?q?L=F6wis?= Python 2 08-05-2003 08:34 PM