Skip to content

Commit f5d02e2

Browse files
authored
Merge pull request #134 from iterorganization/feature/specify-port
Allow specifying a port
2 parents 53221e0 + ae4d8ed commit f5d02e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

waveform_editor/cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ def parse_linspace(ctx, param, value):
7171

7272
@cli.command("gui")
7373
@click.argument("file", type=click.Path(exists=True, dir_okay=False), required=False)
74-
def launch_gui(file):
74+
@click.option(
75+
"-p", "--port", type=int, default=0, help="Specify port to host application."
76+
)
77+
def launch_gui(file, port):
7578
"""Launch the Waveform Editor GUI using Panel.
7679
7780
\b
@@ -88,7 +91,7 @@ def launch_gui(file):
8891
app = WaveformEditorGui()
8992
if file is not None:
9093
app.load_yaml_from_file(Path(file))
91-
pn.serve(app, threaded=True)
94+
pn.serve(app, port=port, threaded=True)
9295
except Exception as e:
9396
logger.error(f"Failed to launch GUI: {e}")
9497

0 commit comments

Comments
 (0)