Sqlite in python plugins/scripts
#1
I have a plugin that uses pysqlite2. I have platform libraries for win32, xbox, Linux, and OSX for older xbmc distributions, and Dharma started including script.module.pysqlite in the base install, at least for the common platforms.

On iOS, I see the script.module.pysqlite folder, but it only contains the addon.xml, and I cannot find the .pyd anywhere. Is this available? If not, are there any alternatives that would allow using sqlite from python on iOS?
Reply
#2
It will need building for iOS. I'm not sure how easy that will be - I'll let the iOS devs know.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
hey, i also have an addon that uses this and had a lot of ATV users complain about not being able to use this.
thanks for the heads-up jonathon
Reply
#4
Were not really complaining, appreciate the effort, just hoping we can get the best add on working on atv2.

Anything that can be done is appreciated, ATV/Xbmc is awesome but it's now missing the hands down best add-on.
Reply
#5
sraue Wrote:Hi,



this comes from using python-2.6 and newer (used in OpenELEC and the ATV2 builds). Python 2.6 and newer has an included sqlite module (sqlite3) and there is no need for pysqlite2. This can simply solved by a check if sqlite3 is installed, if it fails fallback to pysqlite2 like:

Code:
try:
    from sqlite3 import dbapi2 as sqlite
    logFile.info("Loading sqlite3 as DB engine")
except:
    from pysqlite2 import dbapi2 as sqlite
    logFile.info("Loading pysqlite2 as DB engine")

From other thread, maybe this can solve others issues also?
Reply
#6
if it's for reading the xbmc database content, why not use the json or http api instead?
Reply
#7
ppic Wrote:if it's for reading the xbmc database content, why not use the json or http api instead?

I dont know about the others, but in the case of my plugin it is not reading the xbmc database - it is a custom database which supplies the plugin with its data.
Reply
#8
FenceMan Wrote:From other thread, maybe this can solve others issues also?

Spot on. This worked perfectly. Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Sqlite in python plugins/scripts0