View Single Post
Old 12-24-2022, 09:02 PM   #3
vr8ce
Enthusiast
vr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchfork
 
vr8ce's Avatar
 
Posts: 33
Karma: 48958
Join Date: May 2017
Device: iPad Pro 9.7"
Quote:
Originally Posted by kovidgoyal View Post
It's python if you want to import something from somewhere add it to sys.path before doing the import. Assuming your external module is compatible with the version of python it will work fine.
Forgive my ignorance; I use python regularly, but I'm not sure how to deal with calibre's built-in one.

Do you mean my regular python's sys.path, or calibre's sys.path? The module is in the former; if I run python3 at the command line and import the module, it works fine. But doing the same import in a calibre regex function returns the error. Nor do I know what calibre's sys.path is; my local version has all version-dependent directories, so I assume calibre's does as well.
vr8ce is offline   Reply With Quote