@@ -20,7 +20,12 @@ install the files. Julia 0.7 or later is required.
20
20
21
21
The latest development version of PyCall is available from
22
22
< https://github.com/JuliaPy/PyCall.jl > . If you want to switch to
23
- this after installing the package, run ` Pkg.checkout("PyCall"); Pkg.build("PyCall") ` .
23
+ this after installing the package, run:
24
+
25
+ ``` julia
26
+ Pkg. add (PackageSpec (name= " PyCall" , rev= " master" ))
27
+ Pkg. build (" PyCall" )`
28
+ ` ``
24
29
25
30
By default on Mac and Windows systems, ` Pkg.add("PyCall")`
26
31
or ` Pkg.build("PyCall")` will use the
@@ -298,7 +303,7 @@ use `PyDict` as the return type of a `pycall` returning a dictionary,
298
303
or call ` PyDict(o::PyObject)` on a dictionary object ` o` . By
299
304
default, a ` PyDict` is an ` Any => Any` dictionary (or actually ` PyAny
300
305
=> PyAny` ) that performs runtime type inference, but if your Python
301
- dictionary has known, fixed types you can insteady use ` PyDict{K,V} ` given
306
+ dictionary has known, fixed types you can instead use ` PyDict{K,V}` given
302
307
the key and value types ` K` and ` V` respectively.
303
308
304
309
Currently, passing Julia dictionaries to Python makes a copy of the Julia
@@ -359,7 +364,8 @@ and also by providing more type information to the Julia compiler.
359
364
Python' s [` eval` ](https: // docs. python. org/ 3 / library/ functions. html# eval) function, and returns the result
360
365
converted to ` PyAny` . Alternatively, ` py"..."o` returns the raw ` PyObject`
361
366
(which can then be manually converted if desired). You can interpolate
362
- Julia variables and other expressions into the Python code with ` $ ` ,
367
+ Julia variables and other expressions into the Python code (except for into
368
+ Python strings contained in Python code), with ` $` ,
363
369
which interpolates the * value* (converted to ` PyObject` ) of the given
364
370
expression--- data is not passed as a string, so this is different from
365
371
ordinary Julia string interpolation. e. g. ` py"sum($([1 ,2 ,3 ]) )"` calls the
@@ -387,7 +393,7 @@ and also by providing more type information to the Julia compiler.
387
393
* ` pybuiltin(s)` : Look up ` s` (a string or symbol) among the global Python
388
394
builtins. If ` s` is a string it returns a ` PyObject` , while if ` s` is a
389
395
symbol it returns the builtin converted to ` PyAny` . (You can also use ` py"s"`
390
- to look up builtins or other Python globas .)
396
+ to look up builtins or other Python globals .)
391
397
392
398
Occasionally, you may need to pass a keyword argument to Python that
393
399
is a [reserved word](https: // en. wikipedia. org/ wiki/ Reserved_word) in Julia.
0 commit comments