Claudio Grondi wrote:
> so this should work in your case:
>
> import sys
> sys.path.append("C:\some\other\directory")
> import bar
...that will certainly work. Only issue is that each time I start up
foo.py in the python shell I have to retype those three lineskind
of why I was hoping for a e
Yes, you can.
Try this:
import sys
sys.path.append('c:\some\other\directory\')
import bar
Good luck!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of py
Sent: 17. marraskuuta 2005 15:19
To: python-list@python.org
Subject: How to - import code not in cur
PYTHONPATH is perfectcheck out this link for more info..
http://docs.python.org/tut/node8.html#searchPath
I just added the environment variable (on windows) named "PYTHONPATH"
and set it to "C:\some\other\directory"
:)
--
http://mail.python.org/mailman/listinfo/python-list
This question seems to come up in this newsgroup quite often, so looking
through past threads will sure provide more details.
Here from "Re: how to import a module from a arbitraty path?"
posted to comp.lang.python by Simon Brunning on May 26, 2005 09:20 :
"
> I have a program which is going to
"py" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Claudio Grondi wrote:
> > so this should work in your case:
> >
> > import sys
> > sys.path.append("C:\some\other\directory")
> > import bar
>
> ...that will certainly work. Only issue is that each time I start up
> foo.py in
On Thu, 2005-11-17 at 08:41, py wrote:
> Claudio Grondi wrote:
> > so this should work in your case:
> >
> > import sys
> > sys.path.append("C:\some\other\directory")
> > import bar
>
> ...that will certainly work. Only issue is that each time I start up
> foo.py in the python shell I have to ret