From bd63dc886dfabfbd93357cb1d501b62a114eee08 Mon Sep 17 00:00:00 2001 From: Sean Vieira Date: Fri, 24 Aug 2012 13:21:07 -0300 Subject: [PATCH 1/3] Avoid creating escape characters on Windows Mark strings passed to `execfile` as raw strings to avoid having "\\activate_this.py" changed to "\x07ctivate_this.py". --- lang_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang_integration.py b/lang_integration.py index 03bc42c3..db32c684 100644 --- a/lang_integration.py +++ b/lang_integration.py @@ -91,7 +91,7 @@ def run_virtualenv(self, choices, index): (name, directory) = choices[index] activate_file = os.path.join(directory, "activate_this.py") - init_cmd = "execfile('{activate_file}', dict(__file__='{activate_file}')); import site; import sys; sys.ps1 = '({name}) >>> '; del sys;".format(name=name, activate_file=activate_file) + init_cmd = "execfile(r'{activate_file}', dict(__file__=r'{activate_file}')); import site; import sys; sys.ps1 = '({name}) >>> '; del sys;".format(name=name, activate_file=activate_file) self.window.run_command("repl_open", { "type":"telnet", From fcdb1a825cffa76e9834bcf8e8eef64f1e224509 Mon Sep 17 00:00:00 2001 From: Eric West Date: Fri, 31 Aug 2012 03:15:00 -0500 Subject: [PATCH 2/3] Adds the Tower.js console --- config/Tower/Default.sublime-commands | 10 ++++++++++ config/Tower/Main.sublime-menu | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 config/Tower/Default.sublime-commands create mode 100644 config/Tower/Main.sublime-menu diff --git a/config/Tower/Default.sublime-commands b/config/Tower/Default.sublime-commands new file mode 100644 index 00000000..f0688228 --- /dev/null +++ b/config/Tower/Default.sublime-commands @@ -0,0 +1,10 @@ +[ + { + "caption": "SublimeREPL: Tower Console", + "command": "run_existing_window_command", "args": + { + "id": "repl_tower", + "file": "config/Tower/Main.sublime-menu" + } + } +] \ No newline at end of file diff --git a/config/Tower/Main.sublime-menu b/config/Tower/Main.sublime-menu new file mode 100644 index 00000000..8a0fb6c6 --- /dev/null +++ b/config/Tower/Main.sublime-menu @@ -0,0 +1,27 @@ +[ + { + "id": "tools", + "children": + [{ + "caption": "SublimeREPL", + "mnemonic": "r", + "id": "SublimeREPL", + "children": + [ + {"command": "repl_open", + "id": "repl_tower", + "caption": "Tower Console", + "args": { + "cwd": "$project_path", + "type": "subprocess", + "encoding": "utf8", + "cmd": ["tower", "console", "-c"], + "syntax": "Packages/CoffeeScript/CoffeeScript.tmLanguage", + "external_id": "tower", + "extend_env": {"NODE_DISABLE_COLORS": "1"} + } + } + ] + }] + } +] From 3b566bc7c63685cdab7a0675bc5e0ab44cdcdf19 Mon Sep 17 00:00:00 2001 From: Eric West Date: Tue, 4 Sep 2012 01:10:09 -0500 Subject: [PATCH 3/3] Makes fix due to recent change to Tower.js --- config/Tower/Main.sublime-menu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Tower/Main.sublime-menu b/config/Tower/Main.sublime-menu index 8a0fb6c6..a396a97a 100644 --- a/config/Tower/Main.sublime-menu +++ b/config/Tower/Main.sublime-menu @@ -12,7 +12,7 @@ "id": "repl_tower", "caption": "Tower Console", "args": { - "cwd": "$project_path", + "cwd": "$file_path", "type": "subprocess", "encoding": "utf8", "cmd": ["tower", "console", "-c"],