Merge branch 'master' of ssh://apples.lambdacomplex.org/git/scannr
Merge branch 'master' of ssh://apples.lambdacomplex.org/git/scannr

Conflicts:
scannr.py

file:b/.gitmodules (new)
--- /dev/null
+++ b/.gitmodules
@@ -1,1 +1,4 @@
+[submodule "pynma"]
+	path = pynma
+	url = git://github.com/uskr/pynma.git
 

directory:b/pynma (new)
--- /dev/null
+++ b/pynma

file:a/scannr.py -> file:b/scannr.py
--- a/scannr.py
+++ b/scannr.py
@@ -10,11 +10,20 @@
 import wave
 import serial
 #python -m serial.tools.miniterm -p COM20 -e -b 115200 --cr
+import psycopg2
+import sys,os
+
+
+sys.path.insert(0, os.path.join(os.path.dirname(__file__) or '.', 'pynma'))
+import pynma
 
 filename = "demo.wav"
 MIN_LENGTH = 90000
+nma = pynma.PyNMA( "apikey(s)", "developerkey")    
+conn = psycopg2.connect("dbname=test user=postgres")
 
 def worker(filename):
+
     """thread worker function
     http://www.doughellmann.com/PyMOTW/threading/
     https://github.com/uskr/pynma
@@ -25,6 +34,13 @@
     ser.write("GLG\r")   
     line = ser.readline()   # read a '\n' terminated line
     print line
+    """nma.push(application, event, description, (opt) url,)"""
+    """http://initd.org/psycopg/docs/usage.html"""
+    #cur = conn.cursor()
+    #cur.execute("INSERT INTO test (num, data) VALUES (%s, %s)",(100, "abc'def"))
+    #conn.commit()
+    #cur.close()
+
     return
 
 def filenameMaker():