Skip to content

Commit 0249d5b

Browse files
authored
Merge pull request #96 from TTWShell/bugfix/execfile
fix execfile use when py2 to py3
2 parents 970ddef + c191c9d commit 0249d5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vimrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ import sys
160160
if 'VIRTUAL_ENV' in os.environ:
161161
project_base_dir = os.environ['VIRTUAL_ENV']
162162
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
163-
execfile(activate_this, dict(__file__=activate_this))
163+
exec(compile(open(activate_this, "rb").read(), activate_this, 'exec'), dict(__file__=activate_this))
164164
EOF
165165

166166
" Ctrl-j 切换到下方的分割窗口 - Ctrl-k 切换到上方的分割窗口 - Ctrl-l

0 commit comments

Comments
 (0)