From b1fc74b180b522e36deb2e32b488531a3e036607 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Wed, 18 Jan 2012 22:53:50 -0500 Subject: [PATCH] "Execute as HTML5" now actually executes it --- lightningbeam.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lightningbeam.py b/lightningbeam.py index 12511fa..75ca9fc 100755 --- a/lightningbeam.py +++ b/lightningbeam.py @@ -20,6 +20,9 @@ import lightningbeam_windows #pickle - used to save and open files import pickle +#webbrowser - used to launch HTML5 +import webbrowser + #misc_funcs - miscelleneous functions in a separate file so as not to clutter things up too much import misc_funcs @@ -246,7 +249,12 @@ visibility: hidden; }\n\ //Setup\nvar fps = "+str(svlgui.FRAMERATE)+";\n\n\ \n\ -\n\n" +\n\n" return retval def run_html(self=None): global root @@ -257,6 +265,7 @@ def run_html(self=None): shutil.copyfile("base.js",os.getenv('HOME')+"/base.js") except IOError: svlgui.alert("Couldn't copy base.js to "+os.getenv('HOME')+"/base.js!") + webbrowser.open("file://"+os.getenv('HOME')+"/test.html")