No i am not using django. well i tried the following code snippet to get the exception info:
#!/usr/bin/env python
import sys
def application(environ,start_response):
try:
import MySQLdb
tx = 'successfully imported MySQLdb'
except:
tx = str(sys.exc_info())
status = '200 OK'
response_headers = [('Content-Type','text/html'),('Content-Length',str(len(tx)))]
start_response(status,response_headers)
return [tx]
it gave me the following:
(, ExtractionError("Can't extract file(s) to egg cache\n\nThe following error occurred while trying to extract file(s) to the Python egg\ncache:\n\n [Errno 13] Permission denied: '//.python-eggs/MySQL_python-1.2.3-py2.7-linux-x86_64.egg-tmp'\n\nThe Python egg cache directory is currently set to:\n\n //.python-eggs\n\nPerhaps your account does not have write access to this directory? You can\nchange the cache directory by setting the PYTHON_EGG_CACHE environment\nvariable to point to an accessible directory.\n",), )
Plus, how do i set which python version to use, in my code. Thanks