{'selector': 'source.python', 'env': {'PYTHONPATH': '/Users/user/project'},
    'path': '/Users/user/work/myvirtualenv/bin:$PATH', 'name':
    'Run virtualenv python', 'cmd': ['python', '-u', '$file'], 'file_regex':
    '^[ ]*File "(...*?)", line ([0-9]*)', 'variants': [{'name':
    'Run all Tests', 'working_dir': '/Users/user/project', 'cmd': [
    'nosetests']}]}
Using virtualenv with sublime text 2