subdirectories for sys.path import?

Discussion in 'Python' started by mh@pixar.com, Oct 10, 2008.

  1. Guest

    I'm currently sharing a directory on sys.path with another
    group.

    We don't have the option to modify sys.path.

    In order to reduce conflicts between the two group's code,
    installation procedures, etc, I'd like to make a subdirectory
    for each group, and have each group manage their own subdirectory.

    /oursharedpath/lib/python/group1
    /oursharedpath/lib/python/group2

    Is there a way to import a module from one of these subdirectories?
    Any other more pythonic ways to approach the situation?

    Many TIA!
    Mark


    --
    Mark Harrison
    Pixar Animation Studios
     
    , Oct 10, 2008
    #1
    1. Advertising

  2. Guest

    wrote:
    > Is there a way to import a module from one of these subdirectories?
    > Any other more pythonic ways to approach the situation?


    ah, the magic of __init__.py.

    Thanks all!

    --
    Mark Harrison
    Pixar Animation Studios
     
    , Oct 10, 2008
    #2
    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. flupke
    Replies:
    2
    Views:
    1,292
    flupke
    Sep 26, 2005
  2. Frank Millman

    Question about import and sys.path

    Frank Millman, Nov 28, 2006, in forum: Python
    Replies:
    3
    Views:
    334
    Rob Wolfe
    Nov 29, 2006
  3. Jeremy Nicoll - news posts

    Import, how to change sys.path on Windows, and module naming?

    Jeremy Nicoll - news posts, Mar 1, 2008, in forum: Python
    Replies:
    7
    Views:
    706
    Gabriel Genellina
    Mar 4, 2008
  4. Markus Mayer
    Replies:
    8
    Views:
    241
    Gabriel Genellina
    Nov 15, 2008
  5. Kelly, Brian

    python import sys.path

    Kelly, Brian, Dec 30, 2008, in forum: Python
    Replies:
    1
    Views:
    2,328
    John Machin
    Dec 30, 2008
Loading...

Share This Page