Re: Python, input, and breaking the program
The builtin input function will always expect input from the command line, that's what it's intended for. As for input in pygame, I'm not particularly sure. You could always use wxpython dialogs:
def basic_dialog(parent,caption,message,flags):
dlg=wx.MessageDialog(parent,message,caption,flags)
result=dlg.ShowModal()
dlg.Destroy()
return result
def input_box(parent,caption,message,text="",password=False,type=wx.ICON_INFORMATION): #Maybe I should change this to a dictionary with result and value keys. dlg=wx.TextEntryDialog(parent,message,caption,text,wx.OK|wx.CANCEL|type|(wx.TE_PASSWORD if password else 0)) return (dlg.ShowModal(),dlg.GetValue())
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector