469,654 Members | 1,838 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

'unknown' command processing in python ?


Hello,

I am a newbie; looking for an easy equivalent of TCL 'unknown' command
in python. My basic aim is to be able to pass any command which python
interpreter does not understand to my own C++ extension.

The two ways that I understand:

a) Extend cmd.Cmd() class: Will require me to write my own custom
interpreter, however I do not want to execute my own command loop;
rather retain existing user experience of python shell.

b) Handle NameError exception: looks like I'd need to extend cmd.Cmd()
class here as well...

If you know of a simple enough way, or a code snippet that achieves
similar purpose, I'd greatly appreciate it.

Thanks,
Rahul

Apr 11 '06 #1
0 1012

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Christian Long | last post: by
1 post views Thread by Marek Baczek Baczyński | last post: by
reply views Thread by andrea valle | last post: by
6 posts views Thread by lothar.sch | last post: by
6 posts views Thread by Sile | last post: by
12 posts views Thread by Sachin Punjabi | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.