Skip to content

Commit

Permalink
double startup fixed for bokeh browser
Browse files Browse the repository at this point in the history
  • Loading branch information
francoislaurent committed Oct 13, 2020
1 parent 42fd7f1 commit 182aa5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tramway/plot/bokeh/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ def browse_maps(analyzer, **kwargs):
if not model.spt_data_sources[1:]:
controller.load_source(model.spt_data_sources[0])

if not sys.argv[0].endswith('bokeh') and analyzer.env.script:
if not sys.argv[0].endswith('bokeh') and analyzer.env.script and not \
(os.path.isabs(analyzer.env.script) and sys.argv[0] == os.path.basename(analyzer.env.script)):
print('running bokeh server...\n')
import subprocess
p = subprocess.Popen([sys.executable, '-m', 'bokeh', 'serve', '--show', analyzer.env.script],
Expand Down

0 comments on commit 182aa5b

Please sign in to comment.