I am trying to test some code. The main script requires imports from a number of subdirectories. The structure of the scripts is like this (I edited it to make it clear that dir1 and 2 are subdirectories of build):
build
ascript.py
dir1
script2.py
dir2
script3.py
subdir1
script4.py
script5.py
subdir2
script6.py
.
.
.
Note: Not a complete representation.
I was told to test SCRIPT2 through command shell, change to the build directory and then type:
SET PYTHONPATH="." python dir1/script2.py
That script one has an import statement:
from dir2.script3 import *
Script3 calls an import from scripts that are in one or more of the dir or subdir folders
So when run the command SET . . . (see above) I get no output. Thinking that this is a me problem not a code problem I copied dir2 to
C:\PROGRAM FILES\python264
ran the same instructions at the CMD prompt and I got some partial output
This tells me that the SET PYTHONPATH is not working as expected in Windows XP.
I hope this question makes sense.
In response to SLOTT's request - however, after reading his question I understood that one problem is that I did not understand that I was in fact submitting two commands
Note there is a script called node in the directory named html which is a subdirectory of parsers2 which is a subdirectory of core which is at the same level as exp
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\burchkealey.UNO_CBA>cd c:\
C:\>cd c:\texttool1\build
C:\texttool1\build>set pythonpath="."
C:\texttool1\build>python exp/extract_section.py c:\testextract\c40545.htm
Traceback (most recent call last):
File "exp/extract_section.py", line 4, in <module>
from core.parsers2.html.node import *
ImportError: No module named core.parsers2.html.node
C:\texttool1\build>