Difference between revisions of "Sharing files with Python"

imported>Viking60
imported>Viking60
Line 80: Line 80:


===using it===
===using it===
To make a permanent server on port 8000 with python; you can go to the directory you want to share and type:
To make a permanent server on port 8080 with python; you can go to the directory you want to share and type:


  twistd web --path . --port 8000
  twistd web --path .  
[[File:Twisted.jpg|thumb|left|375px]]
[[File:Twisted.jpg|thumb|left|375px]]
twistd web will then start and you can access with the browser as described above.
twistd web will then start and you can access in the browser with localhost:8080.


It looks a bit better and your terminal will not be occupied with "live action". Here all people can access the files at the same time.
It looks a bit better and your terminal will not be occupied with "live action". Here all people can access the files at the same time.
If you are comfortable with using the default port 8080 It will be enough to simply type:
twistd web


===Stopping the server===  
===Stopping the server===  
Anonymous user