public
Created

vim python omni completion

  • Download Gist
example.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/env python
# encoding: utf-8
 
 
import sqlite3
import sys
 
con = None
 
try:
con = sqlite3.connect('test.db')
 
# does vim python omni complete can complete 'cursor()' after 'con' ???
cur = con.cursor()
cur.execute('SELECT SQLITE_VERSION()')
 
data = cur.fetchone()
 
print("SQLite version is %s " % data)
except sqlite3.Error as e:
print("Error ", e)
sys.exit(1)
finally:
if con:
con.close()

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.