Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
trs
Commits
cc507adc
Commit
cc507adc
authored
13 years ago
by
Sander Mathijs van Veen
Browse files
Options
Downloads
Patches
Plain Diff
Added command line options for backend to main.py.
parent
99d5e200
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+12
-0
12 additions, 0 deletions
main.py
with
12 additions
and
0 deletions
main.py
+
12
−
0
View file @
cc507adc
...
...
@@ -10,6 +10,7 @@ import argparse
import
sys
import
os
from
src.backend.backend
import
app
def
init_readline
():
try
:
...
...
@@ -47,6 +48,12 @@ def get_args():
default
=
sys
.
stdin
.
isatty
(),
help
=
'
Enable interactive mode (default). This is the inverse of
'
\
'
--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
()
...
...
@@ -55,6 +62,11 @@ def main():
from
src.parser
import
Parser
args
=
get_args
()
if
args
.
backend
:
sys
.
argv
[
1
]
=
str
(
args
.
port
)
return
app
.
run
()
interactive
=
args
.
interactive
and
not
args
.
batch
p
=
Parser
(
verbose
=
args
.
verbose
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment