|
From: | John Kitchin |
Subject: | Re: ob-python: import local package into a session |
Date: | Mon, 23 Nov 2020 11:03:15 -0500 |
Hi all,
If I have an Org file with Python source blocks, I can run them in a session
with the `:session` header arg. That way, I can include packages installed in
`site-packages` and have them available in all code blocks. But is there a way
to import my own packages into a session? In particular, packages I haven't
installed system-wide?
What I'm trying to do is to import a Python file with a bunch of utility
functions into the ob-python session. I thought this might be possible if I'd
structure my code as a regular Python package, because that works if I want to
import my utility functions into another Python file. But it doesn't seem to
work for the ob-python session.
Is there a way to achieve this? I don't *have* to structure my utility functions
as a Python package, so if there's another way of doing this, I'd be interested
as well.
TIA
Joost
--
Joost Kremers
Life has its moments
[Prev in Thread] | Current Thread | [Next in Thread] |