Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
svieira committed Aug 24, 2012
1 parent fe58960 commit bd63dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang_integration.py
Expand Up @@ -91,7 +91,7 @@ def run_virtualenv(self, choices, index):
(name, directory) = choices[index] (name, directory) = choices[index]
activate_file = os.path.join(directory, "activate_this.py") 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", self.window.run_command("repl_open",
{ {
"type":"telnet", "type":"telnet",
Expand Down

0 comments on commit bd63dc8

Please sign in to comment.