File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,15 @@ def get_arguments():
1818 dict: Arguments dictionary
1919 """
2020 parser = argparse .ArgumentParser (description = "4C Webviewer" )
21+ parser .add_argument (
22+ "--no_webserver" ,
23+ action = "store_true" ,
24+ help = "Don't start the webserver with its GUI?" ,
25+ )
2126 parser .add_argument (
2227 "--fourc_yaml_file" , type = str , help = "input file path to visualize"
2328 )
29+ parser .set_defaults (no_webserver = False )
2430
2531 args = parser .parse_args ()
2632
Original file line number Diff line number Diff line change 1111SERVER_PORT = 12345
1212
1313
14- def run_webviewer (fourc_yaml_file = None ):
14+ def run_webviewer (no_webserver , fourc_yaml_file = None ):
1515
1616 if fourc_yaml_file is None :
1717 fourc_yaml_file = str (DEFAULT_INPUT_FILE )
@@ -22,7 +22,8 @@ def run_webviewer(fourc_yaml_file=None):
2222 )
2323
2424 # start the server after everything is set up
25- fourc_webserver .server .start (port = SERVER_PORT )
25+ if not no_webserver :
26+ fourc_webserver .server .start (port = SERVER_PORT )
2627
2728 # run cleanup
2829 fourc_webserver .cleanup ()
You can’t perform that action at this time.
0 commit comments