View Single Post
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#239
Originally Posted by Frank Banul View Post
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
Probably left over from the swithc from direct database manipulation to the rtcom C library.

As for code reuse...that's what open source is about :-)
__________________
aspidites | blog | aspidites@inbox.com