Closed birbilis closed 4 years ago
thanks, added a new pull request (https://github.com/alexgand/springer_free_books/pull/56) that uses local env variables (useful if one runs the batch file from the command-line, so that the env variable that keeps the major python version isn't seen when the batch file exits - if run from explorer with double-click it doesn't play a difference, since such env vars are removed when command window closes). Also in the same spirit, added call to deactivate for the Python virtual env before the batch file exits (not sure if Python remembers the activated virtual env if you don't deactivate it explictly and just close the command window, but since one can also run a batch from the command-line, better leave things as they were before [aka the virtual env not activated] upon exit from the batch file)
Batch file that detects major python version and runs appropriate virtual environment commands