From 69f0f9de5a751ef306a36c8c0781164276c1534b Mon Sep 17 00:00:00 2001 From: "emery.berger@gmail.com" Date: Sun, 2 Jan 2022 11:12:18 -0500 Subject: [PATCH] Added direct opening of browser to plot URL. --- coz | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/coz b/coz index 5f7c50b..5a103d6 100755 --- a/coz +++ b/coz @@ -116,7 +116,13 @@ def _coz_run(args): exit(result) def _coz_plot(args): - sys.stdout.write('Plot your profile at http://plasma-umass.github.io/coz .\n') + coz_plot_url = 'http://plasma-umass.github.io/coz' + if sys.platform == 'darwin': + subprocess.call(['open', coz_plot_url]) + elif sys.platform == 'win32': + os.startfile(coz_plot_url) + else: + subprocess.call(['xdg-open', coz_plot_url]) # Special format handler for line reference arguments def line_ref(val):