RE: [Tutor] import question (solved)

2005-01-10 Thread Ryan Davis
each script: >>> import sys >>> sys.path.append('../') Thank you all very much for you help. Thanks, Ryan -Original Message- From: Jacob S. [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 9:37 PM To: Alan Gauld; Ryan Davis; Tutor@python.org Subject: Re:

Re: [Tutor] import question

2005-01-07 Thread Jacob S.
> It should work as you describe it. > Can you just clarify how you are doing this? > Are you setting sys.path in the same program you > are trying to run? Or is it set in a Python startup script? > > How do you run a.py? Are you importing it into an existing > Python session(with sys.path set or a

Re: [Tutor] import question

2005-01-07 Thread Alan Gauld
> I'm trying to import classes and functions across > several directories. > Here's a simple example of my filesystem: > /Defs > base.py > /One > a.py > b.py > /Two > c.py > > In a.py I have: > ### > import b > ### > This results in an error: >

[Tutor] import question

2005-01-07 Thread Ryan Davis
Hello all,   I'm just starting to use python seriously, and am having problems understanding exactly what is going on with import statements and the sys.path variable.   I'm trying to import classes and functions across several directories.  Here's a simple example of my filesystem: /D