I have a Python enum named Content
defined in a package named lahave.content
.
$ python
Python 3.11.9 (main, Mar 22 2025, 14:23:33) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from lahave.content import Content
>>> for i in Content:
... print(i)
...
Content.NULL
Content.OPEN
Content.CORRIDOR
Content.DENSE
I am trying to figure out how to access this enum through the library(janus)
library.
From the same directory:
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.2.6)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- use_module(library(janus)).
true.
?- py_call('lahave.content.Content':'Content.DENSE', Content).
% Interactive session; added `.` to Python `sys.path`
Warning: Janus: venv dirrectory '/home/peter/.local/share/virtualenvs/LaHave-zP0WwQMU' does not contain "/home/peter/.local/share/virtualenvs/LaHave-zP0WwQMU/lib/python3.8/site-packages"
ERROR: Python 'ModuleNotFoundError':
ERROR: No module named 'lahave.content.Content'; 'lahave.content' is not a package
ERROR: In:
ERROR: [12] janus:py_call('lahave.content.Content':'Content.DENSE',_60286)
ERROR: [11] toplevel_call(user:user: ...) at /usr/lib/swi-prolog/boot/toplevel.pl:1317
?-
What am I missing?