On Fri, December 1, 2006 1:02 am, belinda thom said: > I decided to go the PYTHONPATH route (in tcsh); it works perfectly--- > thanks! > > On Nov 30, 2006, at 7:23 PM, Douglas S. Blank wrote: > >> For example, if you have pyrobot in your home directory you could >> do this >> in bash: >> >> export PYTHONPATH=$PYTHONPATH:/home/yourid >> export PYROBOT=/home/yourid/pyrobot > > Is there a reason you suggest putting pyrobot at the end of the path? > (I'd have thought pyro users would want any naming conflicts to > resolve to pyro's files).
It shouldn't matter; see below. > Before I sent my original email, I checked out: > > http://www.python.org/doc/2.4.1/inst/search-path.html > > and was worried that so simple a solution as setting PYTHONPATH to > pyrobot's parent would not be enough to tell python to traverse > inside pyrobot's directorys recursively (especially since there was > no .pth file in the pyrobot directory). Is there a piece of magic in > my understanding that's lacking? We always use absolute paths when referring to anything under pyrobot. Therefore, we always import conx these way: import pyrobot.brain.conx from pyrobot.brain.conx import Network Thus, the only module that Python needs to find is "pyrobot". If you install it in the system Python dir, then you are right: you may indeed want to put it first in the PYTHONPATH---just in case students have their own pyrobot directory, it will find the system files first. > Thanks again, You're welcome, -Doug > --b > > > > _______________________________________________ > Pyro-users mailing list > [email protected] > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Associate Professor, Bryn Mawr College http://cs.brynmawr.edu/~dblank/ Office: 610 526 601 _______________________________________________ Pyro-users mailing list [email protected] http://emergent.brynmawr.edu/mailman/listinfo/pyro-users
