I have Python code split into a web frontend and consumer backend. The backend has to run under Jython for interoperability with some Java libraries, but we want to run the webserver in cpython/mod_wsgi because of memory problems we've had running it in Jython through Jetty.
We use virtualenv for development, and I've currently got two virtualenv directories, one for cpython and one for jython. My question is whether both interpreters can happily coexist in one virtualenv (primarily to save having to update installed libraries twice, but also from curiosity). I've initialized the same environment with both interpreters:
virtualenv -p python environ
virtualenv -p jython environ
I can run both interpreters, and I can symlink environ/Lib/site-packages and environ/lib/python/site-packages so that they're both looking at the same place. As long as there are no libraries relying on C extensions/optimizations I can't see why they wouldn't work in both interpreters. Anyone disagree or have any further things to look out for?