python script needs to import win32com.client
#1
Question 
Hi,

I want to write a little script which needs to import win32com.client. Is there a way to include this somehow into my script folder? Sure I could install pywin32 on my system. But the script will then work on my machine only. Making a popup asking the user to install manually seems somewhat silly, too. Any advice from experienced python coders would be highly appreciated. Smile

And another question regarding the addon.xml file. Is <platform>windx wingl</platform> the right way to make my script available to windows systems only?

regards,

SlrG
Reply
#2
Not sure about the platform specific delimiters, but to get access to a module, put everything into a sub folder in your addon and add that folder to your path. Then you should be able to import it normally. Keep in mind that you'll have to do the whole dependency chain this way
Reply
#3
just a note: remember that we won't allow this in official xbmc repo
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
@Bstrdsmkr: Thanks for your answer. I'll try to do this.
@Martijn: Would a small c++ exe file with supplied sourcecode be acceptable? The script would call this file and let it do it's work instead of the win32com.client modules?

What I'm trying to do, is use the new screensaver python script functionality of frodo to start the current windows system screensaver. Without win32com this is a difficult/impossible task to do in python. (at least for me. Smile ) So ATM I'm doing this by calling nircmd.exe screensaver. It works fine to activate the saver. Problem is, that the script gets terminated when xbmc loses focus. After the screensaver closes and focus returns the black xbmc python screensaver base window is still open and the user has to close it with ESC, which is not very nice.

I'm an absolute python noob, but I'm surely not the only one who would like this feature.
Reply
#5
no. only python is allowed
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
python script needs to import win32com.client0