On Apr 24, 3:38 am, A.T.Hofkamp [EMAIL PROTECTED] wrote:
On 2008-04-23, blaine [EMAIL PROTECTED] wrote:
On Apr 23, 2:01 pm, Martin Blume [EMAIL PROTECTED] wrote:
blaine schrieb
No,
while 1:
r = self.fifodev.readline()
if r: print r
else: time.sleep(0.1)
is ok
On 2008-04-23, blaine [EMAIL PROTECTED] wrote:
On Apr 23, 2:01 pm, Martin Blume [EMAIL PROTECTED] wrote:
blaine schrieb
No,
while 1:
r = self.fifodev.readline()
if r: print r
else: time.sleep(0.1)
is ok (note the if r: clause).
Martin
Beautiful! Thanks Martin!
Hey everyone,
So I've got a quick query for advice.
We have an embedded device in which we are displaying to an LCD
device that sits at /dev/screen. This device is not readily available
all the time, so I am needing to write an emulator. This will
basically just monitor a file, /dev/screen
blaine wrote:
Hey everyone,
So I've got a quick query for advice.
We have an embedded device in which we are displaying to an LCD
device that sits at /dev/screen. This device is not readily available
all the time, so I am needing to write an emulator. This will
basically just monitor a
blaine wrote:
example usage: echo 'line 0 0 10 10' /dev/screen
On the actual embedded device this is handled by a kernel module. We
can spit commands into it as fast as we can and the kernel module can
keep up. This is typical unix device file behavior.
Any suggestions or advice would be
(let's try this again, and actually send it to the list this time)
On Wed, Apr 23, 2008 at 11:02 AM, blaine [EMAIL PROTECTED] wrote:
Hey everyone,
So I've got a quick query for advice.
We have an embedded device in which we are displaying to an LCD
device that sits at /dev/screen. This
On Apr 23, 11:17 am, Ville M. Vainio [EMAIL PROTECTED] wrote:
blaine wrote:
example usage: echo 'line 0 0 10 10' /dev/screen
On the actual embedded device this is handled by a kernel module. We
can spit commands into it as fast as we can and the kernel module can
keep up. This is
blaine schrieb
# Fake Nokia Screen Emulator
import sys, os
class nokia_fkscrn:
def __init__(self, file):
if not os.path.exists(file):
os.mkfifo(file)
self.fifodev = open(file, 'r')
def read(self):
while 1:
r = self.fifodev.readline()
print r
On Apr 23, 12:27 pm, Martin Blume [EMAIL PROTECTED] wrote:
blaine schrieb
# Fake Nokia Screen Emulator
import sys, os
class nokia_fkscrn:
def __init__(self, file):
if not os.path.exists(file):
os.mkfifo(file)
self.fifodev = open(file, 'r')
def read(self):
blaine schrieb
while 1:
r = self.fifodev.readline()
if r: print r
According to my docs, readline() returns an empty
string at the end of the file.
Also, you might want to sleep() between reads a
little bit.
Oh ok, that makes sense. Hmm. So do I not want to use
On Apr 23, 2:01 pm, Martin Blume [EMAIL PROTECTED] wrote:
blaine schrieb
while 1:
r = self.fifodev.readline()
if r: print r
According to my docs, readline() returns an empty
string at the end of the file.
Also, you might want to sleep() between reads a
little bit.
Oh
11 matches
Mail list logo