Re: Newbie: import

2007-04-18 Thread 7stud
Here's an example where you are trying to import a function in one of your .py files--when that .py file is not in the current directory: import sys sys.path.append("/Users/me/2testing/dir1/") #directory that contains the file import test1 #name of file without .py extension test1.greet() --

Re: Newbie: import

2007-04-18 Thread 7stud
On Apr 18, 10:34 am, [EMAIL PROTECTED] wrote: > I thought import used relative paths from either the python executable > or the script being executed. I have a script pulling in code from an > arbitrary directory. How is this happening? > > It's a RHEL 4 environment by the way. I couldn't find a

Re: Newbie: import

2007-04-18 Thread Steven Howe
[EMAIL PROTECTED] wrote: I thought import used relative paths from either the python executable or the script being executed. I have a script pulling in code from an arbitrary directory. How is this happening? It's a RHEL 4 environment by the way. I couldn't find any relevant environment vari

Re: Newbie: import

2007-04-18 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I thought import used relative paths from either the python executable > or the script being executed. I have a script pulling in code from an > arbitrary directory. How is this happening? > > It's a RHEL 4 environment by the way. I couldn't find any relevant > enviro