Thread
:
Importing local files within a plugin
View Single Post
11-21-2009, 07:41 PM
#
2
kovidgoyal
creator of calibre
Posts: 43,858
Karma: 22666666
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)
Then your imports should work.
kovidgoyal
View Public Profile
Visit kovidgoyal's homepage!
Find More Posts by kovidgoyal
Track Posts by kovidgoyal via RSS