Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/PyCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ end
import Conda
import MacroTools # because of issue #270
import Base.Iterators: filter
import Libdl

#########################################################################

Expand Down Expand Up @@ -472,7 +473,11 @@ end
function _pyimport(name::AbstractString)
cookie = ActivatePyActCtx()
try
return PyObject(ccall((@pysym :PyImport_ImportModule), PyPtr, (Cstring,), name))
pyobject = PyObject(ccall((@pysym :PyImport_ImportModule), PyPtr, (Cstring,), name))
# From version 1.8 it is possible to detect when two versions
# of the same shared library is loaded\
VERSION > v"1.7.999" && Libdl.dlopen("")
return pyobject
finally
DeactivatePyActCtx(cookie)
end
Expand Down