View Single Post
Posts: 398 | Thanked: 301 times | Joined on Sep 2007 @ Texas
#238
You don't even need to import glib or gobject for the code you have in sms.py.

And for that matter, you can remove sqlite3 import and code, it's not being used if I'm interpreting correctly.

Code:
connection = sqlite3.connect(os.path.join(os.environ['HOME'],
                                     '.rtcom-eventlogger', 'el.db'))
        cursor = connection.cursor()        
        cursor.execute('SELECT id FROM Events')
        id_array = cursor.fetchall()  
        seq_id = max(id_array)[0] + 1
Yes I've been reusing your code in an application that I work on.

Frank

Originally Posted by wheatbisc View Post
Trackback (most recent call last):
File "/opt/vertsms/vertsms_gui.oy", line 19 in <module>
from vertsms import config, sms, pygobject
File "/opt/vertsms/vertsms/sms.py", line 5, in <module>
import ctypes, uuid, glib, gobject
ImportError: No module named glib