Jon Nelson on 7 Jul 2010 08:51:35 -0700 |
On Tue, Jul 6, 2010 at 10:28 PM, Paul L. Snyder <plsnyder@drexel.edu> wrote:
I am by no means a Python or ncurses programmer, but I would think I would be able to figure this out. I guess not :( Here is what I have so far:
#!/usr/bin/env phthon 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 When I run this I get a blinking cursor. If I create a variable in the code and send that to the screen it works. If I just print the line variable using print() it prints out the line. What am I missing.
___________________________________________________________________________ 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
|
|