[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ob-python: import local package into a session
From: |
Jack Kamm |
Subject: |
Re: ob-python: import local package into a session |
Date: |
Mon, 23 Nov 2020 08:21:54 -0800 |
Jack Kamm <jackkamm@gmail.com> writes:
> You need to make sure your module is either in the working directory you
> started the Python session in, or in your PYTHONPATH, for example by
> adjusting os.env["PYTHONPATH"] before attempting to import the module.
Sorry, this was incorrect, you need to set PYTHONPATH before starting
Python. The correct way to do it from within Python is to use sys.path,
as John points out.