Skip to content

Commit 3e4894b

Browse files
author
Christopher Doris
committed
2 parents cfc4b94 + b84c3cb commit 3e4894b

File tree

7 files changed

+25
-3
lines changed

7 files changed

+25
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><img src="https://github.com/raw/JuliaPy/PythonCall.jl/main/docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>
1+
<h1><img src="docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>
22

33
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
44
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliapy.github.io/PythonCall.jl/stable)

docs/make.jl

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ include("customdocs.jl")
55
makedocs(
66
sitename = "PythonCall & JuliaCall",
77
modules = [PythonCall],
8+
format = Documenter.HTML(
9+
assets = ["assets/favicon.ico"],
10+
),
811
warnonly = [:missing_docs], # avoid raising error when docs are missing
912
pages = [
1013
"Home" => "index.md",

docs/src/assets/favicon.ico

49.4 KB
Binary file not shown.

docs/src/assets/logo.png

31.8 KB
Loading

docs/src/juliacall.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pip install juliacall
99

1010
Developers may wish to clone the repo (https://github.com/JuliaPy/PythonCall.jl) directly
1111
and pip install the module in editable mode. You should add `"dev":true, "path":"../.."` to
12-
`python/juliacall/juliapkg.json` to ensure you use the development version of PythonCall
12+
`pysrc/juliacall/juliapkg.json` to ensure you use the development version of PythonCall
1313
in conjunction with JuliaCall.
1414

1515
## Getting started

pytest/test_all.py

+19
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,22 @@ def test_issue_394():
1717
assert jl.f is f
1818
assert jl.y is y
1919
assert jl.seval("f(x)") == 4
20+
21+
def test_issue_433():
22+
"https://github.com/JuliaPy/PythonCall.jl/issues/433"
23+
from juliacall import Main as jl
24+
25+
# Smoke test
26+
jl.seval("x=1\nx=1")
27+
assert jl.x == 1
28+
29+
# Do multiple things
30+
out = jl.seval(
31+
"""
32+
function _issue_433_g(x)
33+
return x^2
34+
end
35+
_issue_433_g(5)
36+
"""
37+
)
38+
assert out == 25

src/JlWrap/module.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function pyjlmodule_dir(self::Module)
1010
end
1111

1212
function pyjlmodule_seval(self::Module, expr::Py)
13-
Py(Base.eval(self, Meta.parse(strip(pyconvert(String, expr)))))
13+
Py(Base.eval(self, Meta.parseall(strip(pyconvert(String, expr)))))
1414
end
1515

1616
function init_module()

0 commit comments

Comments
 (0)