Jon Nelson on 8 Jul 2010 05:09:00 -0700 |
On Thu, Jul 8, 2010 at 12:44 AM, jim fisher <jedijf@myfisher.org> wrote: It works, I just used a small test file so the ncurses went too fast - That did not work for me. I did not see any results on the screen and it just went back to the command prompt. Also, sleeping for two seconds would be too much as I need to see the fluctuation of signal strength in real time as much as possible. On the other hand, Edmond's suggestion of adding ":" to the if line in my original script did work. Thanks! An oversight on my part. There is still and unacceptable latency in the results. Any thoughts on how to speed it up? Here is the working code: #!/usr/bin/env python import curses # create curses screen using whole display stdscr = curses.initscr() # I realize this is an infinite loop while True: # parse the CSV file for line in open('foo-01.csv'): # look for the line with the right MAC if line.find(':5A:84') != -1: # send the line to the screen stdscr.addstr(0, 0, line) # redraw the screen stdscr.refresh() # I realize I am not properly cleaning up, but will get to that later
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|