From dark-raven3 at hotmail.com Fri Apr 22 00:05:46 2011 From: dark-raven3 at hotmail.com (=?iso-8859-2?B?SXZhbiCpZXbo7Ws=?=) Date: Fri, 22 Apr 2011 00:05:46 +0200 Subject: [PythonCE] Input problem Message-ID: 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 require input (that second just prevents from script closing before reading output), 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 quite strange as it's the very same code and it acts like after input is output or all commands ignored. My code: x = input("Enter value") print x raw_input("Enter for exit") Thanks for help as this is an issue I can't move along with.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam.walley at gmail.com Fri Apr 22 01:14:32 2011 From: adam.walley at gmail.com (Adam Walley) Date: Fri, 22 Apr 2011 00:14:32 +0100 Subject: [PythonCE] Input problem In-Reply-To: References: Message-ID: 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 printing 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 = 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 = input("Enter value") print x time.sleep(2) # wait 2 seconds raw_input("Enter for exit") HTH Adam 2011/4/21 Ivan ?ev??k > 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 require > input (that second just prevents from script closing before reading output), > 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 quite > strange as it's the very same code and it acts like after input is output or > all commands ignored. > My code: > x = 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 > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -------------- next part -------------- An HTML attachment was scrubbed... URL: