embedded python question

Michael Hudson mwh at python.net
Wed Jul 24 09:53:02 EDT 2002


"Keith S." <keith_s at ntlworld.nospam.com> writes:

> Alex Martelli wrote:
> 
> > QLineEdit handles (and returns) a single line, right?  Therefore, how
> > can you use it to input a multi-line command?
> 
> True, although you can do this in the Python interactive
> shell, so I presume there *is* a way of doing it.

One way of finding out how is to look at the source.  I seem to recall
that this is a bit hairy, so another way is to look at the standard
code.py or codeop.py library modules.  Either call them from C or do
the same work in C.

> > Why not use a multiline editing widget instead?
> 
> Because I'd really like it to work just like the interactive
> shell if possible...

But you WANT multiline editing if you can get it...  have you looked
at PyCrust?  Oh hang on, that's wx, not Qt, isnt' it?  Ne'er mind.

Cheers,
M.

-- 
  CLiki pages can be edited by anybody at any time. Imagine the most
  fearsomely comprehensive legal disclaimer you have ever seen, and
  double it                        -- http://ww.telent.net/cliki/index



More information about the Python-list mailing list