From d0c7100ffd46fcd2713aa93e5acb76ff502e61c4 Mon Sep 17 00:00:00 2001 From: Stephan Sahm Date: Mon, 8 Jul 2024 00:19:17 +0200 Subject: [PATCH] better Python globals --- Project.toml | 2 +- ext/PythonExt.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index c5d38c6..1fd7a1d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JolinPluto" uuid = "5b0b4ef8-f4e6-4363-b674-3f031f7b9530" authors = ["Stephan Sahm and contributors"] -version = "0.1.66" +version = "0.1.67" [deps] AbstractPlutoDingetjes = "6e696c72-6542-2067-7265-42206c756150" diff --git a/ext/PythonExt.jl b/ext/PythonExt.jl index ddfeb41..35dded5 100644 --- a/ext/PythonExt.jl +++ b/ext/PythonExt.jl @@ -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 @@ -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 # """