problem(s) with import from parent dir: "from ../brave.py import sir_robin"

Magnus Lycka lycka at carmen.se
Mon Feb 27 13:36:57 EST 2006


per9000 wrote:
> ...and there was much rejoicing... Even better, thanks - you guys are
> the best.
> 
> import string, time, sys
> sys.path.append("../../py_scripts")
> 
> Works just nice, and yes, I removed the env.variable before I tried it
> :-D

The *right* thing to do might be to install the python libs
in the correct places. Probably under the site-packages
directory. Take a look at the distutils package.

http://www.python.org/doc/lib/module-distutils.html

It can even build Windows installers and RPMs.

These days there are also spiffy things, such as Python eggs,
ez_setup.py, PYPI and whatever it's called, but I haven't
tried those things.



More information about the Python-list mailing list