On Feb 18, 8:59 pm, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > On Feb 18, 10:49 am, "placid" <[EMAIL PROTECTED]> wrote: > > > On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> > > > > Yes, he is talking about the cmd > > > module:http://docs.python.org/dev/lib/Cmd-objects.html. > > > However that module was never intended as a real interpreter, so > > > defining variables > > > as the OP wants would require some work. > > > > Michele Simionato > > > How much work does it require ? > > Have you ever written an interpreter? It is a nontrivial job. > > Michele Simionato
No i have never written an interpreter and i can just imagine how much work/effort is needed to write something like that. If anyone can provide a suggestion to replicate the following Tcl command in Python, i would greatly appreciate it. namespace eval foo { variable bar 12345 } what this does is create a namespace foo with the variable bar set to 12345. http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.4/tcl/TclCmd/variable.htm The code provided by Peter Otten is a good start for me. Cheers for that! Cheers -- http://mail.python.org/mailman/listinfo/python-list