Created
June 10, 2018 09:55
-
-
Save kiok46/5cd3a1350776b8ab2e778808b9fc6ff8 to your computer and use it in GitHub Desktop.
Plyer: Platform independent compatibility layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # utils.py file. | |
| class Proxy(object): | |
| ... | |
| def __init__(self, name, facade): | |
| ... | |
| def _ensure_obj(self): | |
| ... | |
| name = object.__getattribute__(self, '_name') | |
| module = 'plyer.platforms.{}.{}'.format( | |
| platform, name) | |
| mod = __import__(module, fromlist='.') | |
| obj = mod.instance() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment