alexgand / springer_free_books

Python script to download all Springer books released for free during the 2020 COVID-19 quarantine
GNU General Public License v3.0
1.64k stars 366 forks source link

Batch file for virtual environment (supporting both 2.x and 3.x+) #52

Closed birbilis closed 4 years ago

birbilis commented 4 years ago

Batch file that detects major python version and runs appropriate virtual environment commands

birbilis commented 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)