Skip to content

Commit

Permalink
fix(python): python REPL detection is broken (#345)
Browse files Browse the repository at this point in the history
Closes: #344
  • Loading branch information
pysan3 authored Jul 4, 2023
1 parent 9017061 commit f603de5
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lua/iron/fts/python.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ local windows_linefeed = function(lines)
end

local is_windows = has('win32') and true or false

local pyversion
if os.getenv('VIRTUAL_ENV') ~= nil then
pyversion = 'python'
else
pyversion = executable('python3') and 'python3' or 'python'
end

local pyversion = executable('python3') and 'python3' or 'python'

local def = function(cmd)
return {
Expand All @@ -34,9 +27,9 @@ local def = function(cmd)
}
end

python.ptipython = def({pyversion, "-m", "ptpython.entry_points.run_ptipython"})
python.ipython = def({pyversion, "-m", "IPython", "--no-autoindent"})
python.ptpython = def({pyversion, "-m", "ptpython"})
python.ptipython = def({"ptipython"})
python.ipython = def({"ipython", "--no-autoindent"})
python.ptpython = def({"ptpython"})
python.python = {
command = {pyversion},
close = {""}
Expand Down

0 comments on commit f603de5

Please sign in to comment.