View Single Post
Old 08-19-2022, 06:31 AM   #12
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by lizzie1170 View Post
I wrote the code initially just for an epub book in Visual Studio and it worked for me. Applying code with Calibre functions is another multiverse, that's why I need help putting it in the context of Calibre.
Calibre comes with its own copy of python. As such, you cannot (directly) import modules from your system python. You have two options:
  • Follow davidfor suggestion and develop your solution using code from calibre libraries.
  • Modify sys.path to include the path(s) from which you want to import the original module. You can search the forum for examples. I am not sure what adverse effects this might lead to, as I have never done done it before. So, you have to research this yourself.
capink is offline   Reply With Quote