I have written an internet-application in python using SQLite also it runs fine on my small server in your own home (with apache and python 2.5.2). I am now attempting to upload it to my hosting company there servers use python 2.2.3 without SQLite.
Anybody are conscious of a method to use SQLite in python 2.2.3 e.g. a module will be able to upload and import? I have attempted butchering the module from more recent versions of python, however they don't appear to become compatible.

There's no out-of-the-box solution you can either need to backport the SQLlite module from Python 2.5 to Python 2.2 or request your internet hoster to upgrade towards the latest Python version.

Python 2.2 is actually ancient! A minimum of for security reasons, they ought to upgrade (forget about security fixes for just two.2 since May 30, 2003!).

Note that you could install several versions of Python in parallel. Just make certain you utilize "/usr/bin/python25" rather than "/usr/bin/python" inside your scripts. To make certain all of the old stuff continues to be working, after setting up Python 2.5, you just need to fix the 2 symbolic links "/usr/bin/python" and "/usr/lib/python" that ought to now indicate 2.5. Bend it well to two.2 and you are good.

Take a look here: http://oss.itsystementwicklung.p/download/pysqlite/

In the release notes (http://oss.itsystementwicklung.p/trac/pysqlite/browser/doc/install-source.txt)

  1. Python: Python 2.3 or later

You might not have the ability to do what you are attempting to do.

For those who have spend use of your internet server, you are able to most likely build you are own version of Python and SQLite. Where you can make use of the latest version. Download the origin code, when you configure it, make a move like "./configure --prefix=$HOME/packages".

Next, fiddle around together with your .profile, or .bashrc or anything to make certain $HOME/packages/bin comes first inside your path. This makes your private Python to override the main one installed because of your web server.

This site might provide you with a a bit more information based on how to get this done on the server like Dreamhost: http://wiki.dreamhost.com/Python

Just in case anybody results in this, the key reason why neither pysqlite nor APSW are for sale to Python 2.2 happens because Python 2.3 added the simplified GIL API. Just before Python 2.3 it needed lots of code to keep an eye on the GIL. (The GIL may be the lock utilized by Python to make sure correct behavior while multi-threads.)

Carrying out a backport to two.2 would require ripping out all of the threads code. Attempting to make additionally, it be thread safe under 2.2 will be a nightmare. There is grounds they introduced the simplified GIL API!

I'm still astonished just how popular older Python versions are. APSW for Python 2.3 continues to be regularly downloaded.