Difference between revisions of "Sharing files with Python"

imported>Viking60
imported>Viking60
Line 101: Line 101:
Python is often updated so if you get any errors running the command above you can alternatively try:
Python is often updated so if you get any errors running the command above you can alternatively try:
  python -c 'from twisted.web.server import Site; from twisted.web.static import File; from twisted.internet import reactor; reactor.listenTCP(8000, Site(File("."))); reactor.run()'
  python -c 'from twisted.web.server import Site; from twisted.web.static import File; from twisted.internet import reactor; reactor.listenTCP(8000, Site(File("."))); reactor.run()'
break it off with '''CTRL+Z''' and then type '''bg''' to start it in the background.


Here the server will be on port 8000 you can change it to your liking.
Here the server will be on port 8000 you can change it to your liking.
Anonymous user