Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to get the path of a module (myself) ?

Reply
Thread Tools

how to get the path of a module (myself) ?

 
 
Stef Mientki
Guest
Posts: n/a
 
      06-01-2009
hello,

I've pictures stored in a path relative to my python source code.
To get a picture, I need to know what path I'm on in each python module.
I thought __file__ would do the job,
but apparently I didn't read the documentation carefully enough,
because file is the path to the module that called my module.

Any ways to get the path of "myself" ?

thanks,
Stef Mientki
 
Reply With Quote
 
 
 
Reply

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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
os.path.walk() to get full path of all files dude Python 5 03-17-2011 09:09 AM
How get the virtual path based on the physical path? marss ASP .Net 5 09-13-2007 04:20 PM
Path as a dictionary tree key? (was Re: PEP on path module forstandard library) Ron Adam Python 3 08-02-2005 04:27 AM
how to get application path? Is that my method in getting path wrong? James Java 2 12-07-2004 11:59 AM



Advertisments