In Python version 3, the module was merged into http.server. Gentlemen, change your aliases. Show Sample Output
An alternative to: python -m SimpleHTTPServer for Arch Linux source: http://archlinux.me/dusty/2010/01/15/simplehttpserver-in-python-3/ Show Sample Output
This works on all versions of python 2.X. Tested on Linux and bundled python versions on Mac OSX and Solaris / UNIX Note: Serves globally on port 8000. Ctrl+c to stop. Don't start the server and leave it on a internet connected machine. :) Show Sample Output
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
python -m SimpleHTTPServer 8080
python -m SimpleHTTPServer
+Serving HTTP on 0.0.0.0 port 8000 ... ....webshare () {
local SSHHOST=hostname.of.server
python -m SimpleHTTPServer &
echo http://$SSHHOST:8000 | xclip
echo Press enter to stop sharing, http://$SSHHOST:8000 copied to primary selection
/usr/bin/ssh -R 8000:127.0.0.1:8000 $SSHHOST 'read'kill `jobs -p | head`
}
kill `ps | grep SimpleHTTP | grep -v grep | awk '{print $1}'`
killall python
firefox http://$HOSTNAME:8000/
sudo apt-get install python-twistd-web
twistd -no web
instead.https://construfiber.com/fa
python3 -m http.server