diff options
author | James Meyer <james.meyer@operamail.com> | 2012-05-10 20:06:06 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-05-10 20:06:06 (GMT) |
commit | 2b532b540f448f02d7aee7ff04fa3d31655e7f8f (patch) | |
tree | 61dc3cbb6ce683a7d9d5fed2af090f63a086e86b /abs/core/ncid/ncid.py | |
parent | 42ae9b94604db5f6bd515863e0ffd3a44b6c866e (diff) | |
download | linhes_pkgbuild-2b532b540f448f02d7aee7ff04fa3d31655e7f8f.zip linhes_pkgbuild-2b532b540f448f02d7aee7ff04fa3d31655e7f8f.tar.gz linhes_pkgbuild-2b532b540f448f02d7aee7ff04fa3d31655e7f8f.tar.bz2 |
ncid: reintroduction to repo
Diffstat (limited to 'abs/core/ncid/ncid.py')
-rw-r--r-- | abs/core/ncid/ncid.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/abs/core/ncid/ncid.py b/abs/core/ncid/ncid.py new file mode 100644 index 0000000..1301da1 --- /dev/null +++ b/abs/core/ncid/ncid.py @@ -0,0 +1,35 @@ +#!/usr/bin/python + +import MySQLdb +import sys +import getopt +import socket +import os +cdb = MySQLdb.connect(host="127.0.0.1", user="mythtv", passwd="mythtv", db="ncid") +#log to logger? + + + +#log to db + +def main(argv): + + DATE=sys.stdin.readline().strip() + TIME=sys.stdin.readline().strip() + NUMBER=sys.stdin.readline().strip() + NAME=sys.stdin.readline().strip() + + + #print "start of line" + #print DATE + #print TIME + #print NUMBER + #print NAME + #print "$$$$$$$$$$$$$$$$$$" + ncursor=cdb.cursor() + ncursor.execute ("""INSERT INTO cid (date,time,name,number) VALUES + ('%s', '%s','%s','%s');""" %(DATE,TIME,NAME,NUMBER )) + +if __name__ == "__main__": + main(sys.argv[1:]) + |