Last active
December 7, 2018 23:56
-
-
Save xbalaji/9b647a760e5c54639a89ec17a4eabda6 to your computer and use it in GitHub Desktop.
python simple http server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
startpyws () | |
{ | |
V=$(python -c 'import sys;print(sys.version_info.major)'); | |
if [ "$V" == "2" ]; then | |
python -m SimpleHTTPServer; | |
else | |
python -m http.server; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works better, and is a one-liner: