#!/space/truffles/2/users/rlaplant/.canopyrc/User/bin/python

import os
import sys 

#pyside can cause problems with old versions of enable
#however, forcing traits to use pyqt causes problems in anaconda
#os.environ['QT_API']='pyqt'
os.environ['QT_API']='pyside'

#One or the other should usually be set so that matplotlib and pyface can
#communicate and use the right Qt backend
#pyside is a better default choice

scriptdir=os.getcwd()
os.chdir(os.path.join(os.path.dirname(os.path.dirname(
    os.path.realpath(__file__))),'cvu'))
python_cmd = 'pythonw' if sys.platform=='darwin' else 'python'
arguments = '%s %s'%(scriptdir, " ".join(sys.argv[1:]))
os.system('%s main.py %s' % (python_cmd, arguments))
