[Tutor] Input handling?

Steven D'Aprano steve at pearwood.info
Tue Sep 18 08:12:22 CEST 2012

On Tue, Sep 18, 2012 at 12:04:22AM -0400, Dave Angel wrote:
> On 09/17/2012 11:11 PM, Scott Yamamoto wrote:
> > I've been trying to find possible erros with input(such as NameError or SyntaxError) to handle them with an except clause. however, I've found that hitting enter/return while prompted without inputting creates some kind of problem.
> >>>> username = raw_input("Input a username: ")
> > Input a username: #hits enter, encounter problem here. Loops forever or something
> >
> > Using python for ios
> >
> Somehow you managed to put your other message in its own thread, instead
> of adding to this one.

Not all mail clients support threading, either when receiving or 

But my mail client, mutt, shows Scott's emails threaded correctly. 
Perhaps your mail client is broken? What are you using?

> What version of Python are you running?  If it's 2.x, and if you're
> using input(),

Given that the OP clearly shows

username = raw_input("Input a username: ")

I think that we can safely assume that he is not using 2.x's input :)


More information about the Tutor mailing list