[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Getting input from command line
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Getting input from command line
- From: Knapp <magick.crow@xxxxxxxxx>
- Date: Mon, 1 Dec 2008 14:06:05 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 01 Dec 2008 08:06:17 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=GF9EGsZ91RUGN9JrPWt0hfc+8SMjLh2i5WK4Ey6+w+E=; b=JPRMgW73Fu2+FzP6TFCOhuhalj4WKZkC+U6T6EqMOJ5aAaky9oAVgaLSJSjQoNAZGe 2/bHQRIUK3RycVYi3yX4ei2Pg/6K925lza7uZVtyGI2eSPb7N5maYAitt4OPr8VTrMpf JjSomxT7awFs9FC/Gm8ZI8CXPsZN3ZvV95dz8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=QTCZOCWyhRTGdJSb/xfWlgK19E3S4xLh5X+ff8RfpUK+WffIhKNPU3/p5ykIV51oLT 6u0/vz47qabtGhC/T7nEmO3TLX61WW6Nt6VnsmgivItID+1LmvYpSQzjSuS7c2M41aLs El/7/yEvIYvMsLPhsUYdVD4eTcHyQKWN1OR4Y=
- In-reply-to: <4933DF2B.70307@xxxxxxxxxxxxxxxxxxx>
- References: <4933DF2B.70307@xxxxxxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
> Does anybody know the best way to get input from the command line?
> Specifically space and escape.
>
> I have my program doing things in a thread and constantly reporting
> information. I'd like the main thread to be able to pause and unpause the
> other thread on space and to quit program cleanly with escape.
>
> I tried using Curses, but it didn't work out too well. I got the input
> great, but I came across problems when adding strings that went off screen
> (lol). Rather than try to fix this I finally decided that I didn't want to
> use Curses since it can't run on Windows.
>
> Am I getting into the realm of GUI software here simply by wanting input
> from space and escape? I just wanted something I could start in a terminal
> and forget about really.
>
> Does anyone have any ideas?
>
> Thanks,
> Fiona
I think I must be missing something. Why don't you just use pygame keys?
http://www.pygame.org/docs/ref/key.html
--
Douglas E Knapp
http://sf-journey-creations.wikispot.org/Front_Page