How to write a simple shell loop in python?
prologic at shortcircuit.net.au
Wed Jan 21 06:33:01 CET 2009
On Wed, Jan 21, 2009 at 3:12 PM, Saul Spatz <sspatz at kcnet.com> wrote:
> Strange. I don't have an explanation, but experiment shows that if you
> change print "$ ", to print "$ " (that is, leave out the comma) then the
> leading blank is not printed. This behavior doesn't depend on the "print
> input" statement's being in a loop.
> By the way, you don't need parens around the loop guard in python:
> while 1: (or as I prefer, while True:) work just fine.
This component I wrote - just for the hell of it - (just for this thread)
works nicely :)
More information about the Python-list