Why are ".pyo" files created when importing own modules in addons?
#16
(2017-01-21, 16:27)ronie Wrote: shouldn't kodi generate the bytecode for all included addons, either during compile or at install time?

Why not? Python installers provide an option to pre-compile the standard library during installation. This may be a lengthy process though, so it should be optional.
Reply
#17
(2017-01-21, 16:51)M-Reimer Wrote: Can I get the same behaviour with my Python based Addon? Can I "pre-install" it and the user has it directly available in his Addon list, but has to enable it first? Or is this only possible with Kodi 17 Krypton?

Not sure if it's possible in pre-Krypton. At least, addons installed by copying do work after Kodi reload, unlike in Krypton where you need to enable them first. A bit annoying for addon developers, but I guess it was done to make it difficult to mass-install piracy addons by some "wizards" and such.
Reply
#18
OK. No problem.

But can you tell me where my mistake is in my Addon configuration (https://github.com/M-Reimer/script.service.graphlcd).

I can't see a big difference between my Addon and service.xbmc.versioncheck which is shipped with Kodi.

I also install my Addon to /usr/share/kodi/addons so it sits next to the Addon, shipped with Kodi.

The versioncheck Addon can be disabled but for my Addon the "Disable" option is grayed out.

Is there any chance that I can make it possible for my Addon to be disabled by the user?
Reply
#19
(2017-01-22, 12:31)M-Reimer Wrote: OK. No problem.

But can you tell me where my mistake is in my Addon configuration (https://github.com/M-Reimer/script.service.graphlcd).

I can't see a big difference between my Addon and service.xbmc.versioncheck which is shipped with Kodi.

I also install my Addon to /usr/share/kodi/addons so it sits next to the Addon, shipped with Kodi.

The versioncheck Addon can be disabled but for my Addon the "Disable" option is grayed out.

Is there any chance that I can make it possible for my Addon to be disabled by the user?

As I said, installing addons by copying them, especially in the Kodi installation directory instead of a user profile, is a hack and is not officially supported. So any side effects are possible.
Reply
#20
But PVR client addons are installed in the same way without this problem...
Reply
#21
i know i'm 3 years late but maybe someone will still see this.

what's with all the weird symbols in my .pyo files?
if i make changes to the .py file, do i need to do the same with the .pyo file?
Reply
#22
they are binary files. you can safely ignore those files.
the files are recreated automatically if you've made changes to your .py file.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Why are ".pyo" files created when importing own modules in addons?00
This forum uses Lukasz Tkacz MyBB addons.