Re: [Tutor] Suppressing output in interactive mode

2008-01-12 Thread Kent Johnson
Olivier Lefevre wrote: >> 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Alan Gauld
"Olivier Lefevre" <[EMAIL PROTECTED]> wrote >> 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
> 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Eric Brunson
Olivier Lefevre wrote: >> 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 variabl

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
> 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Alan Gauld
"Olivier Lefevre" <[EMAIL PROTECTED]> wrote >> 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 >

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Eric Brunson
Olivier Lefevre wrote: >> 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 w

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
> 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Alan Gauld
"Olivier Lefevre" <[EMAIL PROTECTED]> wrote > 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 don;t understand the question. Are you talking about the >>> prompt? That is the

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
> 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Andre Roberge
On Jan 11, 2008 9:48 AM, Olivier Lefevre <[EMAIL PROTECTED]> wrote: > 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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
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

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Kent Johnson
Olivier Lefevre wrote: > 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. If you assign the expression to a variable, the value will not be printed. Kent

Re: [Tutor] Suppressing output in interactive mode

2008-01-11 Thread Andre Roberge
You may want to check here: http://mail.python.org/pipermail/edu-sig/2007-August/008154.html André On Jan 11, 2008 7:26 AM, Olivier Lefevre <[EMAIL PROTECTED]> wrote: > This is stupid but my python is rusty I can neither > remember nor find out anew how to enter an expression > that returns a val

[Tutor] Suppressing output in interactive mode

2008-01-11 Thread Olivier Lefevre
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