Commit 9d38d2b
committed
Make virtualenv.vim compatible with Python 3.
The `virtualenv.vim` file used the `execfile()` function to run the
`activate_this.py` script from the active virtual environment. However,
`execfile()` was removed in Python 3. This replaces the call to
`execfile()` with a process that should be compatible with Python 2 and
Python 3:
1. Read the script contents into a string.
2. Pass the string to `compile()` to get a compiled script object.
3. Pass the compiled script object to `exec()`.1 parent a9afe07 commit 9d38d2b
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
0 commit comments