Skip to content

Commit

Permalink
fixing PythonExt
Browse files Browse the repository at this point in the history
  • Loading branch information
schlichtanders committed Jul 7, 2024
1 parent 41215b3 commit 4906a7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JolinPluto"
uuid = "5b0b4ef8-f4e6-4363-b674-3f031f7b9530"
authors = ["Stephan Sahm <[email protected]> and contributors"]
version = "0.1.63"
version = "0.1.64"

[deps]
AbstractPlutoDingetjes = "6e696c72-6542-2067-7265-42206c756150"
Expand Down
6 changes: 4 additions & 2 deletions ext/PythonExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end

const _python_module_where_plutoscript_is_included = Ref{Py}()

function JolinPluto.init_jolin(python_globals::Py)
function JolinPluto.init_jolin(python_globals::Union{Py, PyDict})
_python_module_where_plutoscript_is_included[] = python_globals
end

Expand All @@ -69,7 +69,9 @@ function JolinPluto.lang_copy_bind(::Val{:py}, def, value)
end

function __init__()
JolinPluto.init_module(get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main))
# this is not calling jolin_init, as jolin_init may extend to do further things next to initializing the module
# e.g. in PlutoR it will also set variables
_python_module_where_plutoscript_is_included[] = get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main)
end

# """
Expand Down

0 comments on commit 4906a7e

Please sign in to comment.