Skip to content

Commit

Permalink
docs tweaks [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Doris committed Aug 19, 2022
1 parent 5c5cab8 commit 7f0be40
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/src/compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Some packages require a little extra help to work nicely with PythonCall.
Some of these are "fixes" that are silently applied for you, and some are just extra
functions to bridge a gap. We aim to keep these as minimal as possible.

## Stdlib
## Python standard library

Whenever a Python exception is displayed by Julia, `sys.last_traceback` and friends are set. This allows the post-mortem debugger `pdb.pm()` to work. Disable by setting `PythonCall.CONFIG.auto_sys_last_traceback = false`.

## Tabular data & Pandas
## Tabular data / Pandas

The abstract type [`PyTable`](@ref) is for wrapper types around Python tables, providing the
[Tables.jl](https://github.com/JuliaData/Tables.jl) interface. `PyTable(x)` is shorthand
Expand Down Expand Up @@ -39,7 +39,7 @@ We also provide a simple MatPlotLib backend: `mpl.use("module://juliacall.matplo
Now you can call `plt.show()` to display the figure with Julia's display mechanism.
You can specify the format like `plt.show(format="png")`.

## GUIs (including MatPlotLib)
## Python GUIs (including MatPlotLib)

### Event loops

Expand All @@ -66,4 +66,16 @@ The `juliacall.ipython` IPython extension adds these features to your IPython se
- Calling `display(x)` from Julia will display `x` in IPython.

Enable the extension with `%load_ext juliacall.ipython`.
See https://ipython.readthedocs.io/en/stable/config/extensions/.
See [the IPython docs](https://ipython.readthedocs.io/en/stable/config/extensions/).

## Asynchronous Julia code (including Makie)

Asynchronous Julia code will not normally run while Python is executing, unless it is in a
separate thread.

This can be fixed by calling `jl.yield()` periodically from Python code, allowing the
Julia scheduler to run.

When working at the Python REPL, you may call `juliacall.interactive()` which will allow
Julia async code to run while the prompt is showing. This will allow interactive plots such
as Makie to work.

2 comments on commit 7f0be40

@cjdoris
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/66564

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.5 -m "<description of version>" 7f0be400df66e07d2d760a99b59ea088a99ac6e6
git push origin v0.9.5

Please sign in to comment.