Re: [pygame] Getting input from command line

2008-12-02 Thread Fiona Burrows
Michael wrote: On Monday 01 December 2008 12:57:15 Fiona Burrows wrote: I know this isn't directly related to PyGame but I figured there were worse places to ask a question like this This page is your friend: http://openbookproject.net/py4fun/lode/lode.html#auto2 In fact the

Re: [pygame] Getting input from command line

2008-12-02 Thread LuNan Sheng
Maybe this package would be helpful: http://effbot.org/downloads/#console

Re: [pygame] Getting input from command line

2008-12-02 Thread Lenard Lindstrom
Fiona Burrows wrote: Michael wrote: On Monday 01 December 2008 12:57:15 Fiona Burrows wrote: I know this isn't directly related to PyGame but I figured there were worse places to ask a question like this This page is your friend:

RE: [pygame] Getting input from command line

2008-12-02 Thread Fiona Burrows
The msvcrt module has Windows console I/O routines, including kbhit() (Section 36.2.2 in the Python 2.5 docs). I don't know of any platform independent console routines in Python. -- Lenard Lindstrom [EMAIL PROTECTED] Yeah it's a shame. For all who replied. Thanks a lot! However, I

[pygame] Getting input from command line

2008-12-01 Thread Fiona Burrows
I know this isn't directly related to PyGame but I figured there were worse places to ask a question like this. 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.

Re: [pygame] Getting input from command line

2008-12-01 Thread Knapp
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

Re: [pygame] Getting input from command line

2008-12-01 Thread Fiona Burrows
Knapp wrote: I think I must be missing something. Why don't you just use pygame keys? http://www.pygame.org/docs/ref/key.html I was under the impression that I had to create a window before PyGame would get keys, or is this not the case? I wanted my program to be purely in the terminal.

Re: [pygame] Getting input from command line

2008-12-01 Thread Michael George
Perhaps overkill, and not portable, but you could use the curses module. --Mike Fiona Burrows wrote: I know this isn't directly related to PyGame but I figured there were worse places to ask a question like this. Does anybody know the best way to get input from the command line?

Re: [pygame] Getting input from command line

2008-12-01 Thread Michael George
Michael George wrote: Perhaps overkill, and not portable, but you could use the curses module. --Mike Fiona Burrows wrote: 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

Re: [pygame] Getting input from command line

2008-12-01 Thread Michael
On Monday 01 December 2008 12:57:15 Fiona Burrows wrote: I know this isn't directly related to PyGame but I figured there were worse places to ask a question like this This page is your friend: http://openbookproject.net/py4fun/lode/lode.html#auto2 In fact the entire site is quite fun...