[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] beginning psk31
From: |
Chuck Swiger |
Subject: |
Re: [Discuss-gnuradio] beginning psk31 |
Date: |
Tue, 05 Apr 2005 18:08:34 -0400 |
At 12:43 PM 4/2/2005 -0800, you wrote:
Is typical psk31 usage to buffer up a line using readline or its
equivalent, and then send it? If so, you might want to create a
source that did a non-blocking read on the tty, or readline, or gui,
or whatever, and return the data it got or an indication that there's
no data to send. For full 8-bit transparency, you might want to have
There's an interesting mechanism to poll I/O using module "select",
you can register a file descriptor and poll it with a timeout that either
returns an empty list or a tuple with (fd, event). Example usage:
import sys,tty,select
fd = sys.stdin.fileno()
tty.setraw(sys.stdin.fileno())
a=select.poll()
a.register(fd,select.POLLIN)
while 1:
p=a.poll(320) # wait 320mSec, aboutt 1 char at 31.25 baud
print p
if p==[(fd, 1)]:
ch = sys.stdin.read(1)
print ch,