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 88SERVER_PORT = 12345
99
1010
11- def run_webviewer (fourc_yaml_file = None ):
11+ def run_webviewer (no_webserver , fourc_yaml_file = None ):
1212 """Runs the webviewer by creating a dedicated webserver object, starting it
1313 and cleaning up afterwards."""
1414
@@ -21,7 +21,8 @@ def run_webviewer(fourc_yaml_file=None):
2121 )
2222
2323 # start the server after everything is set up
24- fourc_webserver .server .start (port = SERVER_PORT )
24+ if not no_webserver :
25+ fourc_webserver .server .start (port = SERVER_PORT )
2526
2627 # run cleanup
2728 fourc_webserver .cleanup ()
You can’t perform that action at this time.
0 commit comments