Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for Windows #6
This pull request makes flask-now work on Windows.
This required two minor fixes:
- The `which` utility doesn't exist on Windows which leads to a FileNotFoundError when trying to look up the path of the Python binary. This change adds a fallback to `sys.executable`  which fixes the problem (as long as we can assume that the Python interpreter used to run flask-now is a valid Python3 interpreter). - The path to the pip executable in a virtual environment is different on Windows than Unix which leads to a FileNotFoundError. This change adds a check to `os.name`  to adjust the pip path if flask-now is being run on Windows.  https://docs.python.org/3/library/sys.html#sys.executable  https://docs.python.org/3/library/os.html#os.name
Thanks for your contribution and opening this pull request,