Re: Importing Problem on Windows

2005-01-11 Thread John Machin
brolewis wrote: > I have a directory that has two files in it: > > parse.py > parser.py > > parse.py imports a function from parser.py and uses it to parse out the > needed information. On Linux, the following code works without a > problem: > > parse.py, line 1: > from parser import regexsearch >

Re: Importing Problem on Windows

2005-01-11 Thread John Machin
brolewis wrote: > I have a directory that has two files in it: > > parse.py > parser.py > > parse.py imports a function from parser.py and uses it to parse out the > needed information. On Linux, the following code works without a > problem: > > parse.py, line 1: > from parser import regexsearch >

Re: Importing Problem on Windows

2005-01-11 Thread Peter Otten
brolewis wrote: > I have a directory that has two files in it: > > parse.py > parser.py > > parse.py imports a function from parser.py and uses it to parse out the > needed information. On Linux, the following code works without a > problem: > > parse.py, line 1: > from parser import regexsearc

Re: Importing Problem on Windows

2005-01-11 Thread brolewis
I launched the interpreter shell from the same directory in both Windows and Linux before posting. That's what sent the red flag up for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Problem on Windows

2005-01-10 Thread Grig Gheorghiu
I normall set PYTHONPATH to the parent directory of my module directory tree. If I have my module files in C:\home\mymodules and below, then I set PYTHONPATH to C:\home. This way, I can do "import mymodules" in my code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Problem on Windows

2005-01-10 Thread brolewis
Sorry. 2.4 in both locations -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Problem on Windows

2005-01-10 Thread Kartic
It is quite possible that in linux, you launched the python interpreter shell from the same directory you stored your parser.py and parse.py files. On windows, you probably saved the parser*.py files to some place like "my documents" and launched the python interpreter or IDLE. So, you could prob

Re: Importing Problem on Windows

2005-01-10 Thread Grig Gheorghiu
What version of Python are you running on Linux vs. Windows? -- http://mail.python.org/mailman/listinfo/python-list

Importing Problem on Windows

2005-01-10 Thread brolewis
I have a directory that has two files in it: parse.py parser.py parse.py imports a function from parser.py and uses it to parse out the needed information. On Linux, the following code works without a problem: parse.py, line 1: from parser import regexsearch However, when I run the same command