Skip to content

Commit

Permalink
switching from Py to PyDict
Browse files Browse the repository at this point in the history
  • Loading branch information
schlichtanders committed Jul 7, 2024
1 parent 4906a7e commit cb143f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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.64"
version = "0.1.65"

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



const _python_module_where_plutoscript_is_included = Ref{Py}()
const _python_module_where_plutoscript_is_included = Ref{PyDict}()

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


JolinPluto.lang_enabled(::Val{:py}) = true
function JolinPluto.lang_copy_bind(::Val{:py}, def, value)
_python_module_where_plutoscript_is_included[][String(def)] = value
Expand All @@ -71,7 +71,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[] = get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main)
_python_module_where_plutoscript_is_included[] = PyDict(get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main))
end

# """
Expand Down

0 comments on commit cb143f1

Please sign in to comment.