all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ob-python: import local package into a session
@ 2020-11-23 15:46 Joost Kremers
  2020-11-23 16:03 ` John Kitchin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Joost Kremers @ 2020-11-23 15:46 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-25 12:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 15:46 ob-python: import local package into a session Joost Kremers
2020-11-23 16:03 ` John Kitchin
2020-11-23 16:20 ` Jack Kamm
2020-11-23 16:21   ` Jack Kamm
2020-11-23 22:47   ` Joost Kremers
2020-11-24 12:23 ` Maxim Nikulin
2020-11-24 13:35   ` Joost Kremers
2020-11-24 14:24     ` Jack Kamm
2020-11-24 18:40       ` Tom Gillespie
2020-11-25 12:58       ` Joost Kremers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.