Also ... unless you're writing an Input/Output plugin (or your Edit plugin needs to access external files), there's probably no need for the manual reading and writing of files using Python's native FileIO that your code seems to be using. The Plugin Framework's bk.readfile(), bk.writefile(), bk.addfile() helper functions should be used to read/modify/add-to an epub's content whenever possible.
Perhaps if you could share the general workflow of your proposed plugin, some tips could be given about how best to accomplish it via the existing Framework.
Offhand (without seeing all the code in question), I'm guessing the difference between a successful run using external Python and an unsuccessful one using the bundled Python is an attempt to write a file to a "current working directory" that's privileged under the latter, but not the former. One thing's for sure: something is silently failing when run with the bundled Python. The best way to track it down is to use Try/Except clauses around literally everything, to print out debugging messages all along the way. Sooner or later, you'll find the code that's quietly dying when encountered in the plugin.
Last edited by DiapDealer; 11-15-2016 at 12:11 PM.
|