[Tutor] Curses example on Linux?

2005-08-08 Thread Hossein Movahhedian
Hi All, I have copied the following example from "Learning to Program by Alan Gauld (section: Event Driven Programming)". To run it on Linux (Redhat 8.0; Python 2.4) the tutorial says to replace 'msvcrt' with 'curses.stdscr'. But there is no stdscr method in curses. In fact with 'import

Re: [Tutor] Curses example on Linux?

2005-08-08 Thread Danny Yoo
On Mon, 8 Aug 2005, Hossein Movahhedian wrote: >I have copied the following example from "Learning to Program by Alan > Gauld (section: Event Driven Programming)". To run it on Linux > (Redhat 8.0; Python 2.4) the tutorial says to replace 'msvcrt' > with 'curses.stdscr'. Hi Hossein, A

Re: [Tutor] Curses example on Linux?

2005-08-09 Thread Alan G
>>I have copied the following example from "Learning to Program by >> Alan >> Gauld (section: Event Driven Programming)". To run it on Linux >> (Redhat 8.0; Python 2.4) the tutorial says to replace 'msvcrt' >> with 'curses.stdscr'. I thought I'd fixed that fault. The sequence should be:

Re: [Tutor] Curses example on Linux?

2005-08-09 Thread Hossein Movahhedian
Dear Danny Hi, Many thanks for your help and especially the references in your reply. Now the code works fine. BTW, I had to replace "ky = msvcrt.getch()" with "ky = chr(msvcrt.getch())". Regards, Hossein On Mon, 8 Aug 2005, Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Mon, 8 Aug

Re: [Tutor] Curses example on Linux?

2005-08-09 Thread Hossein Movahhedian
Dear Alan Hi, First of all let me thank you very much for that excellent tutorial. As a Python beginner, I learned many things from that. As I have mentioned in my previous message to this list, in that example I had to replace "ky = msvcrt.getch()" with "ky = chr(msvcrt.getch())

Re: [Tutor] Curses example on Linux?

2005-08-09 Thread Alan G
> "ky = chr(msvcrt.getch())". The other problem is that when > the program is finished the previous terminal state is not > restored (I am using xterm on Linux). Yep, and that applies to my cygwin terminal too. I think there is a setty command you can issue that fixres this but since I hardly ev

Re: [Tutor] Curses example on Linux?

2005-08-12 Thread Alan Gauld
"Hossein Movahhedian" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "ky = chr(msvcrt.getch())". The other problem is that when > the program is finished the previous terminal state is not > restored (I am using xterm on Linux). OK, experimenting with the Linux stty command shows