Yeah, python doesn't have a ++ operator; from the Zen of Python (import this on a console): "Special cases aren't special enough to break the rules." :)
You may have a bit of trouble getting the CGI script to use the right python version; if you can't get apache to use the virtualenv's own one (which magically sets up the correct site-packages, etc), although I suspect Apache makes that fairly easy to configure. If all else fails, check out the activate_this.py script that virtualenv installes into the virtualenv's bin/, which can set up the magic before you start importing anything.
no subject
on 2011-03-02 12:46 pm (UTC)You may have a bit of trouble getting the CGI script to use the right python version; if you can't get apache to use the virtualenv's own one (which magically sets up the correct site-packages, etc), although I suspect Apache makes that fairly easy to configure. If all else fails, check out the activate_this.py script that virtualenv installes into the virtualenv's bin/, which can set up the magic before you start importing anything.