Starting a Dead-Simple Webserver Using Python

technology.pngI ran across this post, which pointed out that the popular programming language Python has a built-in webserver.
It’s definitely not for anything like production use, but if you just want to share a few files over your home network, it’s great.   And because it’s Python, it should run pretty much the same no matter what operating system you have Python installed on.


The command is pretty simple – from a command prompt, type:

python -m SimpleHTTPServer

and you’ll be up and running.  Point the browser at your computer’s local IP address (find it on Windows, Mac, Linux) and port 8000.  So let’s say your computer is at  In the browser bar, you type
and boom!
Of course, me being me, this wasn’t enough.  So I made two bash scripts – one to call from a terminal window (like, from an alias), and one to call using Zenity so I could choose the directory.  They should also be embedded below; YMMV with those. While Zenity is cross-platform, bash isn’t.
With convention season coming up, this is an interesting alternative to carrying around thumbdrives, don’t you think?  Just remember to shut down the server when you’re not actively using it.
Terminal script:

Zenity GUI script:

Popular posts:

  • Six tactics the right-wing uses - and what to do about them.
  • Trained to take it personally
  • New fiction up for you to read!
  • Harassment Policies: Yup, It's Still A Thing.
  • Link Salad: References From The Digital Publishing Talk
  • I'm Supporting Banned Books Week at My Local Library... are you?
  • Making GeekTool a little easier on the system