- Trace your program:
apitrace trace python main.py - Dump the trace:
apitrace dump python.2.7.trace > log - Check for leaks:
python findleak.py log
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
| """ | |
| Simple `ScreenManager` carousel with screen widgets and optionally, a | |
| shader transition. | |
| This `ScreenManager` changes its `Screen` widgets every 2 seconds (note | |
| the `Clock.schedule_interval()` in `CarouselTest1.__init__()`. | |
| Additional transitions can be triggered with the toggle button. | |
| """ |
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
| """ | |
| https://github.com/kivy/kivy/issues/2120 | |
| Issue was created 2014-04-28. Confirming this has not been fixed yet. | |
| """ | |
| from kivy.logger import Logger | |
| from kivy.app import App | |
| from kivy.lang import Builder | |
| from kivy.uix.boxlayout import BoxLayout | |
| from kivy.uix.button import Button |
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
| """ | |
| Kivy ThreadWorker example app. | |
| """ | |
| import kivy | |
| kivy.require('1.10.0') | |
| import threading | |
| import time |
Note: This would be in addition to a directive like in Python files:
coding: ...
- (+) Simple, straight-forward
- (-)
Builder.load_file(...)andBuilder.load_string(open(...))would have differing behaviours (Windows, Linux without UTF-8 locale) because defaultopen(...)uses preferred system encoding - (?) can't say what the impact on mobile devices is (Android/iOS)
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
| --- | |
| # Kivy development installation into a virtualenv from the GitHub master | |
| # repository. Meant to be run locally for the currently logged in user. | |
| # Ubuntu, Python 3, Cython 0.28.2, HEAD of master branch. | |
| # | |
| # ~/ | |
| # ├── kivy (kivy_local_repo) | |
| # │ └── ... | |
| # ├── venv (venv) | |
| # : └── ... |
-
Travis CI: Some problem with the
Inspectorcan cause the tests# 121 test_widget_multipopupand# 122 test_widget_popupto hang on Travis CI and in VirtualBox VMs. Manual minimise/maximise/restore/resize fixes it. Current workaround in55200ee. -
Appveyor: MinGW tests fail due to lack of proper OpenGL support. Potential fix: see how
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
| # -*- coding: utf-8 -*- | |
| from __future__ import absolute_import, unicode_literals | |
| import logging.config | |
| class F(logging.Filter): | |
| def __init__(self, level): | |
| super(F, self).__init__(logging.getLevelName(level)) |
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
| """ | |
| Kivy App. | |
| """ | |
| import kivy | |
| kivy.require('1.10.0') | |
| from kivy.app import App | |
| from kivy.lang import Builder | |
| from kivy.uix.actionbar import ActionItem |
OlderNewer