Howto add python modules?
#1
hi folks,

I'm a python newbie and even newer to xbmc scripting but I would like to script some skype interaction using the Skype4Py python wrapper for the skype api.
as I'm not sure howto get this module added to the xbmc libs, can somebody give me a brief outline of what steps are needed in order to get this simple one-liner working from within a script in xbmc:

Code:
import Skype4Py
#some code...

The Skype4Py module installer can be downloaded from here:
https://developer.skype.com/wiki/Skype4Py

my xbmc (camelot) is running on windows.

thanks in advance!
Reply
#2
Find out what modules are needed to run Skype4py (may be some .py and .so files) and add the path to this files as follows:
Code:
sys.path.append( path to your modules here )

if you want to add support for multiple os you could add something like this (taken from the Apple Movie Trailers script):
Code:
# Shared resources
BASE_RESOURCE_PATH = os.path.join( os.getcwd(), "resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
# append the proper platforms folder to our path, xbox is the same as win32
env = ( os.environ.get( "OS", "win32" ), "win32", )[ os.environ.get( "OS", "win32" ) == "xbox" ]
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "platform_libraries", env ) )
Reply
#3
manxus Wrote:I'm a python newbie and even newer to xbmc scripting but I would like to script some skype interaction using the Skype4Py python wrapper for the skype api.

manxus, check out anwmalos' work here: http://forum.xbmc.org/showthread.php?tid=81032
Reply

Logout Mark Read Team Forum Stats Members Help
Howto add python modules?0