470,648 Members | 1,672 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

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
controlStructure {
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
Jul 18 '05 #1
1 1512
In article <84**************************@posting.google.com >,
Bhushit Joshipura <bh*****@hotmail.com> wrote:
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
controlStructure {
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.

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.