Python for TCLer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bhushit Joshipura

    Python for TCLer

    I am almost brainwashed to forsake TCL for Python. However, I wanted
    to ask a few preliminary questions before I jump in.

    The over all picture of my project would look like:

    Front End : TCL scripts - Our API to users (Can't change because of
    legacy)
    ----->Middle Layer : Framework (PYTHONization Target)
    Back End: TCL API from vendors (Can't change), in-house Expect API
    (can't risk for reliability)

    1. One of my vendors supplies TCL package only. Can I call TCL
    procedures from Python back end? What about Expect scripts?

    2. OTOH, all my scripts are in TCL. Can I invoke python from TCL and
    retain states in python?

    3. This is closely related to uplevel question already discussed in
    this group. We have one control structure in our API that has done
    wonders in productivity. I can not let it go.

    Does python let me write a control structure? It looks like:

    set x 10
    set y 5
    controlStructur e {
    do something with $x until y becomes 3 ;#This is evaluated in
    caller's frame
    }

    4. Does there exist a mapping of TCL facilities over Python? It will
    help me in training man power. Ideal place would describe

    uplevel "..."
    would translate to
    <python equivalent>

    eval "..."
    would translate to
    <python equivalent>

    subst "..."
    ....

    5. Does Aspect Oriented Extension exist for Python? I know TOS
    (http://www.aopsys.com/tos) is no longer maintained for TCL.

    Thanks in advance,
    -Bhushit
  • Cameron Laird

    #2
    Re: Python for TCLer

    In article <849e4506.04062 30949.605df12e@ posting.google. com>,
    Bhushit Joshipura <bhushit@hotmai l.com> wrote:[color=blue]
    >I am almost brainwashed to forsake TCL for Python. However, I wanted
    >to ask a few preliminary questions before I jump in.
    >
    >The over all picture of my project would look like:
    >
    >Front End : TCL scripts - Our API to users (Can't change because of
    >legacy)
    >----->Middle Layer : Framework (PYTHONization Target)
    >Back End: TCL API from vendors (Can't change), in-house Expect API
    >(can't risk for reliability)
    >
    >1. One of my vendors supplies TCL package only. Can I call TCL
    >procedures from Python back end? What about Expect scripts?
    >
    >2. OTOH, all my scripts are in TCL. Can I invoke python from TCL and
    >retain states in python?
    >
    >3. This is closely related to uplevel question already discussed in
    >this group. We have one control structure in our API that has done
    >wonders in productivity. I can not let it go.
    >
    >Does python let me write a control structure? It looks like:
    >
    >set x 10
    >set y 5
    >controlStructu re {
    > do something with $x until y becomes 3 ;#This is evaluated in
    >caller's frame
    >}
    >
    >4. Does there exist a mapping of TCL facilities over Python? It will
    >help me in training man power. Ideal place would describe
    >
    >uplevel "..."
    >would translate to
    ><python equivalent>
    >
    >eval "..."
    >would translate to
    ><python equivalent>
    >
    >subst "..."
    >...
    >
    >5. Does Aspect Oriented Extension exist for Python? I know TOS
    >(http://www.aopsys.com/tos) is no longer maintained for TCL.[/color]

    Comment

    Working...