Alan Gauld wrote:
> Why remove them?
I think they might be confusing; unless perhaps you gave
them special names.
> How are you using the prompt?
I tend to cut and paste individual lines.
Incidentally the lack of readline is the reason why large
amounts of output are such a big deal.
I think we
> Sounds like you need a better interactive development tool.
> You should try emacs. :-)
With jython the options are limited: even readline is a luxury,
but I'll look into it.
-- O.L.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mai
> Then assign the return value to a variable and never use it.
That feels obfuscated; definitely not an elegant solution.
When I'm done with interactive development and save the
substance to a script I'd have to chase these bogus
assignments to junk variables and remove them; not a
smooth workflow
> Are you talking about the >>> prompt?
Yes.
> But if you refer to a loop when would you ever be evaluating
> expressions inside a loop without assigning them?
Some method calls return a value that you may not be interested
in but which will still be printed, e.g., Set.add in Java (if
you are
> If you follow the discussion thread look through the link I provided,
> I believe this is addressed a bit later.
Yes and no. They do discuss possible hooks a bit further in
http://mail.python.org/pipermail/edu-sig/2007-August/008161.html
but merely to suggest toggling between echo and no-echo. I
Thanks for both suggestions. The displayhook trick would
be OK if there was a way to retrieve what _would_ have
been printed last if the display had not been changed:
something like a modified '_'. As it stands, it's a bit
radical.
-- O.L.
___
Tutor mai
This is stupid but my python is rusty I can neither
remember nor find out anew how to enter an expression
that returns a value w/o being seeing the result printed.
I would have expected something
expr;
as opposed to
exp
to do the trick but no dice and I haven't had any luck
with Google or t