Skip to content

Commit

Permalink
better Python globals
Browse files Browse the repository at this point in the history
  • Loading branch information
schlichtanders committed Jul 7, 2024
1 parent 45c009c commit d0c7100
Show file tree
Hide file tree
Showing 2 changed files with 3 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.66"
version = "0.1.67"

[deps]
AbstractPlutoDingetjes = "6e696c72-6542-2067-7265-42206c756150"
Expand Down
4 changes: 2 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{PyDict}()

JolinPluto.init_jolin(python_globals::Py) = JolinPluto.init_jolin(PyDict(python_globals))
JolinPluto.init_jolin(python_globals::Py) = JolinPluto.init_jolin(pyconvert(PyDict, python_globals))
function JolinPluto.init_jolin(python_globals::PyDict)
_python_module_where_plutoscript_is_included[] = python_globals
nothing
Expand All @@ -72,7 +72,7 @@ end
function __init__()
# 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[] = PyDict(get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main))
_python_module_where_plutoscript_is_included[] = pyconvert(PyDict, get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main))
end

# """
Expand Down

0 comments on commit d0c7100

Please sign in to comment.