I’m writing my first plugin here which needs to use some 3rd party Python modules. What is the preferred method for getting these modules on the end-user’s system? I’ve tried placing the relevant files in Contents/Code/ with init.py, but when PMS tries to load my plugin it errors when it tries to import the module in the same directory. I’m probably missing something obvious but couldn’t craft a search query that gave me anything relevant.
Edit: Sorry, the error being “ImportError: No module named mymodule.class” from the line: from mymodule.class import Class
Well... I dug some more and saw a few mentions of Contents/Libraries/Shared/. I dumped the 3rd party ones into there and it appears to being trying to load them now which is cool. PMS is complaining about a syntax error in one of them now... not sure what that's about.
Heh, more info. Turns out I just needed to search a little harder. The syntax error problem stems from the fact that OS X PMS uses Python2.5. Time to find more shared modules! :)
The way to include 3rd party modules is to add them to the plugin bundle in a separate directory as:
<br />
Plugin.bundle/Contents/Libraries/Shared/<your module><br />
You'll also need to use the "Elevated" plugin code policy in order for the framework to allow loading a Shared Library. You set that flag in the plugin's Info.plist like so:
<br />
<key>PlexPluginCodePolicy</key><br />
<string>Elevated</string><br />
-Edit-
Heh, looks like I'm too slow.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.