[Twisted-Python] how can i connect curses getch function and a process launched with spawnprocesss?

Gabriel Santonja gsantonja at free.fr
Tue Jan 2 17:06:08 EST 2007


Hello,

first : Happy new year 2007.

second : I have some difficulties with curses getch() function  and process launch
with spawnprocess.

I'm newbie in Twisted so i'm using the curses example who work fine with irc factory.
i'm using the process howto too 

But when i try to send a message to a process with a 
    >>> self.transport.writeSequence(contents+"\n") 

It's work fine with deferred but never with the curses.getch()

i need a loop like that :
	-  a caracter is push on the keyboard
	- getch function of curses send it 
	- this event is processing
	- a message is send to the process (launch by spawnprocess) who is concerned
	- a result is  send by the process and he is processing by the program 

i think I need to work with the reactor but i do not know how. 

I have trie all i can imagine but nothing work. Could you help me?

Thanks gabriel




More information about the Twisted-Python mailing list