Sharing data is a very frequent activity in the computer world. There are many great ways and utilities to share data with other people on network. Python provides a very quick and simple way to share data with people on the network. To share the data within a directory, go to that directory (through cd command) and execute command python -m SimpleHTTPServer <portnumber> .Please note that the above command is very case sensitive . Now the entire content under this directory could be accessed on the network by typing http://<ip address of your machine>:<portnumber> in a web browser. Once your done with the sharing, cancel the data serving by pressing Ctrl + C key combination\. Python comes pre installed in many of the Linux distributions these days. So Linux users just need to run the command simply. As python is cross platform this will work on other platforms too after the installation.
Example : I want to share my music directory . So I will move to my music directory through cd command and type there python -m SimpleHTTPServer 7000 where 7000 is the port number. Then I will tell the ip of my machine to the person with whom I want to share my data. In the browser he types http://<My Ip Address>:<port number>. Screenshots of the same is shown below :





As qwerty said, Python’s native SimpleHTTPServer is not concurrent. This can be a headache many times (most of the time indeed)… But it is nice for occasional (emergency) use.
A note about using using python’s SimpleHTTPServer: it isn’t concurrent which means that it will only accept one request at a time.
Cool, simple, and elegant every tip should be like this.
Thanks, Very cool and very useful.
very cool and really simple !
Thank You Sir
Good Tips. Thanks for sharing.
this is really helpful
awesome post…thanx a lot for sharing this…