how to call user defined TCL procedures from python script?

Discussion in 'Python' started by comp.lang.python, Nov 21, 2006.

  1. 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
     
    comp.lang.python, Nov 21, 2006
    #1
    1. Advertisements

  2. 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
     
    Stephan Kuhagen, Nov 21, 2006
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.