|
Revision 75
(checked in by fumanchu, 6 years ago)
|
New httpdrop tool (HTTP drop box/file browser).
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
import os |
|---|
| 2 |
import sys |
|---|
| 3 |
|
|---|
| 4 |
import cherrypy |
|---|
| 5 |
import __init__ as httpdrop |
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
if __name__ == "__main__": |
|---|
| 9 |
args = sys.argv[:] |
|---|
| 10 |
args.pop(0) |
|---|
| 11 |
if args: |
|---|
| 12 |
path = args[0] |
|---|
| 13 |
else: |
|---|
| 14 |
path = os.getcwd() |
|---|
| 15 |
cherrypy.config.update({"environment": "production"}) |
|---|
| 16 |
cherrypy.tree.mount(httpdrop.HTTPDrop(path)) |
|---|
| 17 |
cherrypy.server.start() |
|---|
| 18 |
cherrypy.engine.start() |
|---|