Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
cc507adc
Commit
cc507adc
authored
Mar 29, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command line options for backend to main.py.
parent
99d5e200
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
main.py
main.py
+12
-0
No files found.
main.py
View file @
cc507adc
...
@@ -10,6 +10,7 @@ import argparse
...
@@ -10,6 +10,7 @@ import argparse
import
sys
import
sys
import
os
import
os
from
src.backend.backend
import
app
def
init_readline
():
def
init_readline
():
try
:
try
:
...
@@ -47,6 +48,12 @@ def get_args():
...
@@ -47,6 +48,12 @@ def get_args():
default
=
sys
.
stdin
.
isatty
(),
default
=
sys
.
stdin
.
isatty
(),
help
=
'Enable interactive mode (default). This is the inverse of'
\
help
=
'Enable interactive mode (default). This is the inverse of'
\
' --batch.'
)
' --batch.'
)
parser
.
add_argument
(
'--backend'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Start term rewriting system backend (default: disabled).'
\
' This is the backend for the web frontend.'
)
parser
.
add_argument
(
'port'
,
type
=
int
,
default
=
8080
,
nargs
=
'?'
,
help
=
'Port number for system backend (default: 8080).'
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
@@ -55,6 +62,11 @@ def main():
...
@@ -55,6 +62,11 @@ def main():
from
src.parser
import
Parser
from
src.parser
import
Parser
args
=
get_args
()
args
=
get_args
()
if
args
.
backend
:
sys
.
argv
[
1
]
=
str
(
args
.
port
)
return
app
.
run
()
interactive
=
args
.
interactive
and
not
args
.
batch
interactive
=
args
.
interactive
and
not
args
.
batch
p
=
Parser
(
verbose
=
args
.
verbose
,
p
=
Parser
(
verbose
=
args
.
verbose
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment