Skip to content

Commit

Permalink
Rename option -h (--http) to -t; look for closure-library in a locati…
Browse files Browse the repository at this point in the history
…on relative to the code, not relative to the current directory
  • Loading branch information
ivan committed Jun 8, 2011
1 parent 64a1d24 commit d156efc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -37,13 +37,13 @@ Note that Twisted and Webmagic can be installed using `pip`.

To start the server, run:

`twistd -n coreweb_site -h tcp:9090:interface=127.0.0.1 --closure-library=/abspath/closure-library`
`twistd -n coreweb_site -t tcp:9090:interface=127.0.0.1 --closure-library=/abspath/closure-library`

or on Windows:

```
set PYTHONPATH=C:\Coreweb's_parent_directory (if not already in PYTHONPATH)
C:\Python27\python.exe C:\Python27\Scripts\twistd.py -n coreweb_site -h tcp:9090:interface=127.0.0.1 --closure-library=C:\abspath\closure-library
C:\Python27\python.exe C:\Python27\Scripts\twistd.py -n coreweb_site -t tcp:9090:interface=127.0.0.1 --closure-library=C:\abspath\closure-library
```

Note that if `closure-library` is in the parent of the current directory
Expand Down
2 changes: 1 addition & 1 deletion coreweb/__init__.py
@@ -1 +1 @@
__version__ = '11.6.7'
__version__ = '11.6.8'
7 changes: 5 additions & 2 deletions coreweb/tap.py
Expand Up @@ -7,19 +7,22 @@
from coreweb import coreweb_site


_defaultClosureLibrary = FilePath(__file__).parent().parent().parent().child("closure-library").path
assert isinstance(_defaultClosureLibrary, str), type(_defaultClosureLibrary)

class Options(usage.Options):
"""
Define the options accepted by the I{twistd coreweb_site} plugin.
"""
synopsis = "[coreweb_site options]"

optParameters = [
["http", "h", None,
["http", "t", None,
"strports description for the HTTP server. "
"Example: 'tcp:80:interface=127.0.0.1'. "
"Repeat this option for multiple servers."],

["closure-library", "c", "../closure-library",
["closure-library", "c", _defaultClosureLibrary,
'Path to closure-library'],
]

Expand Down

0 comments on commit d156efc

Please sign in to comment.