Hi,
I have a particular problem. I have written a python program that
scans a network with different tools (say nmap,xprobe,p0f etc). The
tools are implemented as plugins so that a user can nw tools easily.
The directory structure is somewhat like
trunk/
DBWriter.py -- File for interfacing with DB
Scanner/
__init__.py
network_mapper.py
Scanner.py
Plugins/
__ini__.py
nmap.py
p0f.py
Others/ -- Other modules that also use DBWriter
Earlier I did not have plugins folder and all data of Plugins/*.py was
in Scanner.py. Then I ran the following command-
python Makespec.py --onefile /home/dheeraj/IDS/trunk/Scanner/
network_mapper.py /home/dheeraj/IDS/trunk/DBWriter.py
The resulting executable was flawless (Scanner.py was imported in
network_mapper.,py so pyinstaller probably picked it up from there)
Now I have the give nstructure. To dynamically load correct module as
per user's choice of tool, I use imp.find_module and imp.load_module.
The code written works correctly for normal python execution (Without
an executable file). But when I try to build an exectable using
python Makespec.py --onefile /home/dheeraj/IDS/trunk/Scanner/
network_mapper.py /home/dheeraj/IDS/trunk/DBWriter.py /home/dheeraj/
IDS/trunk/Scanner/Scanner.py /home/dheeraj/IDS/trunk/Scanner/Plugins/
*.py
or by explicitly using import Plugins
or by from Plugins import *
and later using imp.load_module to load requested module, I get
ImportError due to find_module/load_module
Note: The two import statements work correctly from my Python
installation
Is there a workaround/patch/technique which will enable executable to
correctly find my modules
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyinstaller?hl=en.