Re: __file__ is sometimes absolute, sometimes relative

2010-10-01 Thread Sébastien Barthélemy
Hi, Arnaud, Christian, thank you for your help. I'll use abspath, it's shorter. Any idea why it's sometimes absolute, sometimes not? -- http://mail.python.org/mailman/listinfo/python-list

__file__ is sometimes absolute, sometimes relative

2010-10-01 Thread Sébastien Barthélemy
Hello, I use a data file that lies on disk in the same directory that the module which makes use of it. The data file is checked in the repository and gets installed by the distutils ``package_data`` directive, so it is in place both during development and after and install. In my program, I nee