> On Tue, Jul 7, 2009 at 2:30 AM, Timothy M. Shead<
tshead@...> wrote:
>> Paulo Teotonio Sobrinho wrote:
>>> Hi
>>>
>>> I'm playing with the new python shell dialog and I must say, it is really
>>> useful! To give one example, one can interactively learn the python
>>> interface much faster than any other way, specially people like me that
>>> are not experienced programmers.
>>
>> Glad to hear it!
>>
>>> I have some questions regarding the python shell
>>>
>>> 1) K3d 0.7.11.0 does not have really usable shell. On the other hand
>>> 0.7.12.0 has a nice python shell but the mesh module will be off for some
>>> time. I would like to have both. How can I build 0.7.11.0 but with the
>>> newest python shell? I tried to copy ngui_python_shell/dialog.cpp over the
>>> old one, but it did not work.
>>
>> Hopefully the mesh module won't be off for long :) In the meantime,
>> multiple files changed to implement the Python shell. If you want to
>> backport it, you'll have to use svn to look at the history and see
>> everything that changed. This is technically feasible, but you'll have
>> to do the homework.
>>
>>> 2) It seems that line editing in 0.7.12.0 python shell is not working. For
>>> example, I am able to move the cursor to any point on a line of text, but
>>> I can not erase or insert any character.
>>
>> This is by-design - the Python shell works like any other - once you
>> enter a command with the "return" key, it becomes part of the shell
>> history. Editing it after the fact wouldn't make any sense, since the
>> command has already been executed by the Python interpreter. You seem
>> to want some kind of hybrid between a text editor and an interactive
>> interpreter. I'm open to the idea, but I've never seen such a thing.
>> Got an example?
>
> I think this really was a bug: moving somewhere in the middle of a
> non-submitted line of code did not allow editing. I fixed this in my
> branch, see changeset:
>
http://code.google.com/p/k3d-bart/source/detail?r=9c859a8ea62a22817ea44f236fcf150ee0dce7c9>
> Cheers,
>
> --
> Bart
>