



I'm new to Komodo (4.1.1 is my first experience with it) and am trying to create a project that consolidates various python source trees that are all dependent into a single project for editing/debugging purposes (obviously).
My expectation has been that by using Folders and Live folders to build the project structure in a form that the script expects, I should be able to run/debug without issue. However, when I try to run a file, it can't find the modules that are in the project at the location the script should be looking.
I have searched documentation, but am still confused if/how the Komodo project structure relates to the python import paths. Can someone point me to some light and knowledge?
Also, is there a way to create projects that are dependent on other projects? I'd like to just tell the child project to use the parent project without having to reimport everything.
Thanks!!
You should be able to right-click on the Project and select 'Properties' to bring up the Project Properties dialog. If you then go to Languages / Python you should be able to add additional Python import directories there.
If you have common Python libraries that you want to include in *all* projects or one-off scripts, you can open up Komodo's preferences dialog and add additional Python module directories globally at Languages / Python as well.
--
JeffG
You'll need to use the same techniques you use when setting up the python environment outside of Komodo. That is generally, you'll need to ensure the required python modules are included in the PYTHONPATH environment variable.
You can set this variable either in Komodo's preferences (which is a global setting), or you can set it inside the dialog displayed when you go to run/debug (Ctrl-F5) inside of Komodo.
The Komodo project structure does not automatically add any of these facilities, though this may make a nice enhancement request (checkbox option to include the currently active project folder paths onto the PYTHONPATH variable).
Cheers,
Todd
Thanks for the input!!
I agree that it would be a VERY NICE enhancement request to be able to automatically include the project structure in the PYTHONPATH.
If all of the modules/packages I wanted to use were static and I didn't need to edit them, then adding them to the project Properties->Languages->Python->"Additional Python Import Directories" would not be as painful.
Thanks again!