Skip to content

Commit

Permalink
Main-ify record.py
Browse files Browse the repository at this point in the history
Renamed record to main and made it auto-run the main routine when
executed from command line. To make it easier to run therein, added
shebang and made it executable.

Also fixed a copy-paste error on the name of the serial port var.
  • Loading branch information
liliakai committed Aug 30, 2012
1 parent def7935 commit 5175af8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion record.py → main.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/python
import os
import serial

Expand Down Expand Up @@ -28,8 +29,10 @@ def main():
port = open_serial()

while True:
outfile.write(ser.readline())
outfile.write(port.readline())

outfile.close()
port.close()

if __name__ == "__main__":
main()

0 comments on commit 5175af8

Please sign in to comment.