Path problems in with python -- trying to test plugin code

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Sun May 22, 2011 5:04 am
red04sox offline
Posts: 6
Joined: Jan 04, 2011
Location: Massachusetts

Path problems in with python -- trying to test plugin code

I've been able to adapt some pre-existing plugin code (e.g., editing the reqhandler.py file of the Eventlog plugin) to create my own plugins. I'd like to compile/test code on the command line for debugging purposes before having to run it through the IndigoWebServer but am having problems finding the modules that it wants to import.

(from the .../Indigo 4/IndigoWebServer directory)

python plugins/Router/reqhandler.py

Traceback (most recent call last):
File "plugins/Router/reqhandler.py", line 22, in <module>
import cherrypy
ImportError: No module named cherrypy

I assume this is a matter of setting the paths right when running python from the command line (with bug-free code, everything runs fine through IWS). Any advice? FYI, I'm running OSX 10.6 and when I 'which python' get /opt/local/bin/python. I have the same problem if I specify /usr/bin/python.

Posted on
Sun May 22, 2011 9:29 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Path problems in with python -- trying to test plugin co

cherrypy is included in the IndigoWebServer folder. So adding that to the path or running the script from that folder might help.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests