Re: Input problem

Adam Walley <[email protected]> Fri, 22 Apr 2011 00:14:32 +0100
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
--===============0134933573==
Content-Type: multipart/alternative; boundary=90e6ba53a0ce6a0b4e04a175e736

--90e6ba53a0ce6a0b4e04a175e736
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

Hello, Ivan.

Welcome to PythonCE. From your message, I think your script is probably
working fine. The problem is that blasted dialog, which is covering your
output. A very simple workaround is to add a few blank lines before printin=
g
your x value, so that it appears below the dialog (I know this works on a
PDA, but maybe the screen size is different on a mobile phone?). Your code
might look like:

x =3D input("Enter value")
print 10*"\r\n"             # prints 10 blank lines
print x
raw_input("Enter for exit")

Alternatively, you might want to add a short pause before the exit:

import time
x =3D input("Enter value")
print x
time.sleep(2)             # wait 2 seconds
raw_input("Enter for exit")

HTH

Adam


2011/4/21 Ivan =A9ev=E8=EDk <[email protected]>

>  I am started a weeak ago with python, and yesterday I wodnloaded for my
> mobile.
> However I feel that something got wrong. The problem is that when I run a
> script on computer that requires input, prints something and agains requi=
re
> input (that second just prevents from script closing before reading outpu=
t),
> i get what I want - example :
> Enter value10
> 10
> Enter for exit
>
> That's not the case with pythonCE. It creates dialog, I enter value,
> nothing is printed out and I am again prompted for exit. I find that quit=
e
> strange as it's the very same code and it acts like after input is output=
 or
> all commands ignored.
> My code:
> x =3D input("Enter value")
> print x
> raw_input("Enter for exit")
>
> Thanks for help as this is an issue I can't move along with..
>
> _______________________________________________
> PythonCE mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/pythonce
>
>

--90e6ba53a0ce6a0b4e04a175e736
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

Hello, Ivan.<div><br></div><div>Welcome to PythonCE. From your message, I t=
hink your script is probably working fine. The problem is that blasted dial=
og, which is covering your output. A very simple workaround is to add a few=
 blank lines before printing your x value, so that it appears below the dia=
log (I know this works on a PDA, but maybe the screen size is different on =
a mobile phone?). Your code might look like:</div>
<div><br></div><div>x =3D input(&quot;Enter value&quot;)</div><div>print 10=
*&quot;\r\n&quot; =A0 =A0 =A0 =A0 =A0 =A0 # prints 10 blank lines</div><div=
>print x</div><div>raw_input(&quot;Enter for exit&quot;)<br><br></div><div>=
Alternatively, you might want to add a short pause before the exit:</div>
<div><br></div><div>import time</div><div>x =3D input(&quot;Enter value&quo=
t;)</div><div>print x</div><div>time.sleep(2) =A0 =A0 =A0 =A0 =A0 =A0 # wai=
t 2 seconds</div><div>raw_input(&quot;Enter for exit&quot;)</div><div><br><=
/div><div>
HTH</div><div><br></div><div>Adam</div><div><br></div><div><br><div class=
=3D"gmail_quote">2011/4/21 Ivan =A9ev=E8=EDk <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]">[email protected]</a>&gt;</span><=
br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex;">




<div>
I am started a weeak ago with python, and yesterday I wodnloaded for my mob=
ile.<br>However I feel that something got wrong. The problem is that when I=
 run a script on computer that requires input, prints something and agains =
require input (that second just prevents from script closing before reading=
 output), i get what I want - example : <br>
Enter value10<br>10<br>Enter for exit<br><br>That&#39;s not the case with p=
ythonCE. It creates dialog, I enter value, nothing is printed out and I am =
again prompted for exit. I find that quite strange as it&#39;s the very sam=
e code and it acts like after input is output or all commands ignored. <br>
My code:<br>x =3D input(&quot;Enter value&quot;)<br>print x<br>raw_input(&q=
uot;Enter for exit&quot;)<br><br>Thanks for help as this is an issue I can&=
#39;t move along with..<br> 		 	   		  </div>
<br>_______________________________________________<br>
PythonCE mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><br>
<a href=3D"http://mail.python.org/mailman/listinfo/pythonce" target=3D"_bla=
nk">http://mail.python.org/mailman/listinfo/pythonce</a><br>
<br></blockquote></div><br></div>

--90e6ba53a0ce6a0b4e04a175e736--

--===============0134933573==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PythonCE mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythonce

--===============0134933573==--