[Sorry for top posting - I had a HD problem and lost the original mails]
Hi Saul, Steve, Ben, James, Scott David and James!
Thank you all very much for your help! I finally got rid of the extra
space and also understood why the space was printed :)
After using Steve's 'input = raw_input("$ ")' s
Dietrich Bollmann wrote:
I am trying to write a simple shell loop in Python.
My simple approach works fine - but the first output line after entering
something is always indented by one blank.
Is there any logic explanation for this?
Yes
How can I get rid of the blank?
By not asking for i
Dietrich Bollmann wrote:
> Hi,
>
> I am trying to write a simple shell loop in Python.
>
> My simple approach works fine - but the first output line after entering
> something is always indented by one blank.
>
> Is there any logic explanation for this?
> How can I get rid of the blank?
> Is
Dietrich Bollmann writes:
> I am trying to write a simple shell loop in Python.
You should investigate the ‘cmd’ module in the standard library
http://docs.python.org/library/cmd.html>.
> My simple approach works fine - but the first output line after
> entering something is always indented by
On Wed, Jan 21, 2009 at 3:12 PM, Saul Spatz 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 b
Dietrich Bollmann wrote:
Hi,
I am trying to write a simple shell loop in Python.
My simple approach works fine - but the first output line after entering
something is always indented by one blank.
Is there any logic explanation for this?
How can I get rid of the blank?
Is there a smarter