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

Discussion in 'Python' started by Stef Mientki, Jun 1, 2009.

  1. Stef Mientki

    Stef Mientki Guest

    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
     
    Stef Mientki, Jun 1, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Garcia Aprea [MVP]

    Re: Howto catch HttpRequestValidationException myself

    Victor Garcia Aprea [MVP], Jul 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    512
    Victor Garcia Aprea [MVP]
    Jul 12, 2003
  2. digger440uk
    Replies:
    3
    Views:
    467
    Peter Flynn
    Jun 3, 2006
  3. Ron Adam
    Replies:
    3
    Views:
    450
    Ron Adam
    Aug 2, 2005
  4. Stef Mientki
    Replies:
    11
    Views:
    492
    Steven D'Aprano
    Jun 5, 2009
  5. Richard Hollenbeck
    Replies:
    1
    Views:
    105
    Michael Winter
    Jan 18, 2004
Loading...

Share This Page