Req Python3 compatible equivalent to xbmcswift2
#1
Hi all,

Since new addons need to be python3 and xbmcswift2 isn't compatible, what is the equivalent I can use? I've tried xbmc but I can't import my plugin route from this as it doesn't have a module it seems. Obviously, I can search for guides on xbmcswift2 all day long, but searching for "xbmc python guide" doesn't give me the userguide I need for obvious reasons.
Reply
#2
If you looking for routing aspect: https://github.com/tamland/kodi-plugin-routing
If you looking for running addon from command line, than I would like to know too.
Proud developer for Shoko and Nakamori. Long time xbmc/kodi user. IT Freak at Monogatari.
Reply
#3
(2019-08-08, 06:54)bigretromike Wrote: If you looking for routing aspect: https://github.com/tamland/kodi-plugin-routing
If you looking for running addon from command line, than I would like to know too.

Thanks yeah, I found that, only problem is I have no idea how to translate my current addon into that format as the functions are all different and this script has only a very brief guide.
Reply
#4
As a web developer I initially liked this Flask-like decorator syntax of xbmcswift but now based on my experience I can tell you that the less abstractions you have the better your code is. Abstractions are too brittle and in case of third-party dependencies there's always a chance that the library you are using will be abandoned because its developer's interests changed.
So I'd recommend to stick to raw Kodi Python API as much as possible.
Reply
#5
I just ran a test of converting xbmcswift2 to Python 3 using 2to3.  It ran correcty with my Python 3 updated zap2epg addon - so as soon as I get a few moments - I will try to provide an updated version of xbmcswift2 for the Matrix repo.  The current one in there is definitely not Python 3 compatible - so I'm not sure it should be included in the Matrix repo.

Until I can get a proper PR setup for the xbmcswift2 addon...here is a test version for anyone interested.

https://www.dropbox.com/s/fbn1e02uclcv4d...3.zip?dl=0

Enjoy!

-------------------------------
FYI - I've submitted a PR to the original author - but I'm not sure if he is still actively working on this.  If you like, you could pull from my repo for the Matrix version -- keeping the original for Leia and prior.
https://github.com/edit4ever/xbmcswift2-...ree/matrix

Another option would be to rename the updated version to xbmcswift3 -- but authors would need to update their addons to this name when they update their addons for Python3 compatibility.
Current Kodi addon projects: zap2epg, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3 and the occasional s905 box
If you like my work you can buy me a coffee!
Reply
#6
(2019-12-02, 23:32)edit4ever Wrote: I just ran a test of converting xbmcswift2 to Python 3 using 2to3.  It ran correcty with my Python 3 updated zap2epg addon - so as soon as I get a few moments - I will try to provide an updated version of xbmcswift2 for the Matrix repo.  The current one in there is definitely not Python 3 compatible - so I'm not sure it should be included in the Matrix repo.

Until I can get a proper PR setup for the xbmcswift2 addon...here is a test version for anyone interested.

https://www.dropbox.com/s/fbn1e02uclcv4d...3.zip?dl=0

Enjoy!

-------------------------------
FYI - I've submitted a PR to the original author - but I'm not sure if he is still actively working on this.  If you like, you could pull from my repo for the Matrix version -- keeping the original for Leia and prior.
https://github.com/edit4ever/xbmcswift2-...ree/matrix

Another option would be to rename the updated version to xbmcswift3 -- but authors would need to update their addons to this name when they update their addons for Python3 compatibility.

Hey,

I've also started working on adding support for python3 into xbmcswift2 so that at least the broken addons are not broken because of a dependency:

https://github.com/XBMC-Addons/script.mo...c336dde82f

My main goal is to store this framework in a common repository (such as XBMC-Addons) so that anyone can work on the codebase without retaining ownership. Using frameworks for addon development is not advised at all, so I personally would prefer to have a version that is both python2 and python3 compatible only as a means to have old addons working. Feel free to join in the effort. I'm basically testing old addons and fixing stuff on the framework as I run into python3 issues.

Cheers
Reply
#7
A pull request is opened with a version compatible with python2 and python3:

https://github.com/xbmc/repo-scripts/pull/1222

If you plan to update any of the addons that have this module as a dependency please give it a go with the above version and let me know of any issues you might find.
Reply

Logout Mark Read Team Forum Stats Members Help
Python3 compatible equivalent to xbmcswift20