From: tim_one at email.msn.com (Tim Peters)
Date: Sat, 17 Apr 1999 17:08:39 GMT
Subject: sys.path.insert - how to make it global?
In-Reply-To: <19990417113121.A1627033@vislab.epa.gov>
References: <19990417113121.A1627033@vislab.epa.gov>
Message-ID: <000301be88f4$f0096d60$ee9e2299@tim>
X-UID: 838                                                  

[Stefan Franke]
> sys.path *is* already global, though only accessible via the
> sys module's namespace. Just give it a try.

[Randall Hopper]
> I'd already tried that.  It's effect doesn't appear to be global:
>
>    # Augment search path to pull in our C library wrappers
>    sys.path.insert( 0, '/home/mylogin/Wrappers' )
>
>    import MapFile
>
> This allows Python to find MapFile, but this doesn't allow MapFile to
> import other modules in that same Wrappers directory.

Randall, try posting a minimal set of failing code.  This works for everyone
else on the face of the earth, so the hope is that in trying to whittle your
code down you'll come face to face with the demon who's clouding your mind
<wink>.  If MapFile is C code, it's more likely that you're writing C-level
imports incorrectly.

debugging-as-exorcism-ly y'rs  - tim






