how to call user defined TCL procedures from python script?

C

comp.lang.python

Hi,
I am using some TCL driver APIs and user define TCL function to
control a traffic generator. The APIs are the traffic generator's
specific and in built to the driver library.

The issue is calling API and user define TCL functions from python
script.
I am looking for the way to include user define TCL lib to python
script and call those user define functions from python script.
thanks & regards
ananya
 
S

Stephan Kuhagen

comp.lang.python said:
I am looking for the way to include user define TCL lib to python
script and call those user define functions from python script.

If you import Tkinter and then evaluate Tcl-Script, passing back the results
a strings into Python. Example:

hello
''

With this you can load Tcl-Libs ("package require ..."), execute the needed
functionality and "return $VALUE" to pass results to Python.

HTH
Stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top