S
Stefan Salewski
Hello,
I just start learning Python (ordered "Dive into Python" a week ago).
In the past I have used the Python interactive interpreter for some
calculations instead of Linux command line tools like "bc" or "calc".
I wonder if it is possible to do a pre-processing of command strings in
the interactive interpreter. (Not that I really need it, and currently my
Python skills are far away to manage this hack. But I am curious -- did
some Google search yesterday, but did not find an answer. Yes, an extended
interpreter called IPython exists -- this one seems to have this
functionality, and I may use this one later.)
It is possible to convert input in this form (input hook?):
My custom input format:
Format send to interpreter after preprocessing:
Best regards
Stefan Salewski
I just start learning Python (ordered "Dive into Python" a week ago).
In the past I have used the Python interactive interpreter for some
calculations instead of Linux command line tools like "bc" or "calc".
I wonder if it is possible to do a pre-processing of command strings in
the interactive interpreter. (Not that I really need it, and currently my
Python skills are far away to manage this hack. But I am curious -- did
some Google search yesterday, but did not find an answer. Yes, an extended
interpreter called IPython exists -- this one seems to have this
functionality, and I may use this one later.)
It is possible to convert input in this form (input hook?):
My custom input format:
Format send to interpreter after preprocessing:
Best regards
Stefan Salewski