March 6th, 2013, 10:25 AM
Additional Modules for Client API
I am trying to deploy the API for TACTIC (asset management software), reading the manual, where documentation suggests to place the CLIENT api folder in a shared location on the network.
The CLIENT folder consist "*.py" files (modules) that are later being used for the programming part.
I followed instructions in both, the API doc and Pythiong Doc, where i am required to add ENVIRONMENTAL PATH to PYTHON as well as include the location of my SHARED folders.
When i run:
In output i can see my PATH that links to custom network location as well as additional standard Python libs/modules.
Back to my IDLE editor:
Could you suggest the way out? to get things working?
>>> from tactic_client_lib import TacticServerStub
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
from tactic_client_lib import TacticServerStub
ImportError: No module named tactic_client_lib
Thanks in advance!
March 6th, 2013, 01:57 PM
March 6th, 2013, 02:00 PM
I tried that and looks like it works perfectly.
The question now is this :
if other clients (users) will have to access and execute this same script, their workstations does not have modified Python, what would be the most efficient way of updating their SYS path to look in a proper shared space?
This is one of the main reasons, if i am correct, that my API suggests to run via PYTHONPATH.
March 6th, 2013, 06:19 PM
Just include the "sys.path.append("/blah/blah/blah") in the script, itself.
March 7th, 2013, 11:31 AM
Ok, it works the way i was expecting it. Great. Thank you!