R
rjain7
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
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