calling python script from php with import module in it -


i have module ( z:\development\pipeline\tom\maya\modules\getticket ) imported in python script (which queries database , sends list on web interface) being called in php script.

the python code:

#!/usr/bin/env python # encoding: utf-8  import getticket serversetup import json  def main():     var = []     var.append("from python :):)")     print var json.dumps(main()) 

php code :

putenv('pythonpath=z:/development/pipeline/tom/maya/modules'); 

this import getticket line giving error (see below). without import works fine.

question how import python module in python script such when python script run within php script works alright.

error in apache_error.log:

traceback (most recent call last):   file "tacticactivity.py", line 13, in <module>     import getticket serversetup importerror: no module named getticket 


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -