|
|
#1 |
|
Connoisseur
![]() ![]() Posts: 91
Karma: 108
Join Date: Jan 2008
Device: Palm Treo 680, Sony Reader
|
However, once I zip them up into a plugin, the import fails. The main function is called, but it can't find the other files. Originally, I just did: "import filename" since they were in the same folder. How should I reference these files so they can be found within the plugin? I'd hate to have to try and mash them all together into a single file. - Jim |
|
|
|
|
|
#2 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,657
Karma: 3473290
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the plugin system will give your plugin a path to the zip file in self.plugin_path. You can just add that to sys.path like this
Code:
sys.path.insert(0, self.plugin_path)
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
Enthusiast
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error importing mobi files | Nomadin | Calibre | 27 | 02-19-2010 04:15 AM |
| Importing HTML Files | Shadowlane | Calibre | 1 | 12-19-2009 03:04 PM |
| Importing files onto a Kindle | Dahak | Amazon Kindle | 7 | 05-19-2009 12:12 AM |
| Error when importing MobiPocket files. | mbovenka | Calibre | 7 | 08-16-2008 10:07 AM |
| Kindle Browser and local files | slm | Amazon Kindle | 2 | 06-03-2008 08:29 PM |