On 1/20/06, Mike Sarahan <[EMAIL PROTECTED]> wrote: > The way I found to do this is to use python's __file__ > > eg > os.path.split(__file__)[0] > > I am calling my scripts from cron, so the full path is necessary in the > call anyway, and it'll work nicely. Thanks for your suggestions!
Note that this doesn't work if it's in a zipped egg. That's one plus to using the pkg_resources API. Installing eggs seems quite easy (easy_install), and it doesn't really get in the way of distributing a tarball and letting people run "setup.py install" just as they always have. They just need to have setuptools installed. Kevin

