Skip to content

Instantly share code, notes, and snippets.

@pkit
Created May 8, 2014 16:40
Show Gist options
  • Save pkit/361d26944c9674963de5 to your computer and use it in GitHub Desktop.
Save pkit/361d26944c9674963de5 to your computer and use it in GitHub Desktop.
#!file://python:python
import sqlite3
import os
conn = sqlite3.connect('/dev/input')
cur = conn.cursor()
cur.execute('SELECT name from object')
for row in cur.fetchall():
print str(row[0])
[{
"name": "sqlite",
"exec": {
"path": "file://python:python",
"args": "-"
},
"devices": [
{
"name": "input",
"path": "swift://~/test1"
},
{
"name": "stdin",
"path": "swift://~/test1/sqlite.py"
},
{
"name": "stdout",
"content_type": "text/plain"
},
{
"name": "python"
}
],
"replicate": 0,
"attach": "input"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment