Sublime Forum

Python virtual environment

#1

Hi All,

This is my first post on Sublime Text forum, so I hope I will get your help.

I started working with python and create a virtual environment for every different topic.
I installed the plugin for virtual environment, but I do not think it works as I would expect.

Say I have as virtual environment ‘pyEphem’ (calculate ephemeris based on TLE’s).

  • If I activate it in subl, how can I check whether the correct virtual environment is run?
  • in this environment I have a main python script which needs CLI arguments, how can I set this in the corresponding project so that I can test with CLI args specified into the project file?

The CLI args that I enter in a terminal are eg:

$ > workon pyEphem
$ (pyEphem) > ./GNSStracking --date “2016/01/31” --system galileo

Tx for any help

bye/Alain

0 Likes

#2

With a project-specific build system.

Something along the lines of this:

{
    "shell_cmd": "workon pyEphem & ./GNSStracking --date \"2016/01/31\" --system galileo",
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "working_dir": "${folder:${project_path:$file_path}}"
}
0 Likes