On Nov 3, 4:18 am, Bjoern Schliessmann <usenet- [EMAIL PROTECTED]> wrote: > Jeff McNeil wrote: > > I've used the 'os.path.realpath(os.path.pardir)' construct in a > > couple of scripts myself. > > In Windows? Using Linux, this gives me "..". > > I use os.path.dirname(os.path.abspath(__file__)) > > > That ought to work within the interactive interpreter. > > Why do you also enter that code in the interpreter? If it is in a > module, you should always be able to use __file__. > > Regards, > > Björn > > -- > BOFH excuse #238: > > You did wha... oh _dear_....
> I use os.path.dirname(os.path.abspath(__file__)) That makes sense, as it is almost a literal translation of what I'm used to using in PHP. Thanks for pointing this out.
-- http://mail.python.org/mailman/listinfo/python-list