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 -*- | |
| import kivy | |
| kivy.require('1.8.1') | |
| from kivy.app import App | |
| from kivy.lang import Builder | |
| root = Builder.load_string(''' | |
| <RTLTest@BoxLayout>: |
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
| from time import sleep | |
| from timeit import timeit | |
| class TestHasattr(object): | |
| def __init__(self): | |
| self.a = 1 | |
| def __getattr__(self, name): | |
| print 'sleeping...' | |
| sleep(0.1) |
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
| from timeit import timeit | |
| class TestAttr(object): | |
| def __init__(self): | |
| self.a = 1 | |
| def hasset(self, name, value): | |
| if hasattr(self, name): | |
| setattr(self, name, value) |
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
| class Selector(object): | |
| __slots__ = ('...',) | |
| def __setattr__(self, name, value): | |
| try: | |
| return object.__setattr__(self, name, value) | |
| except AttributeError: | |
| for widget in self: | |
| self._set_widget_attr(widget, name, value) |
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 -*- | |
| def testfn(): | |
| print [unicode('%s') % (u'C:\\FFmpeg\\๗in.jpeg', )] | |
| return [unicode('%s') % (u'C:\\FFmpeg\\๗in.jpeg', )] | |
| if __name__ == '__main__': | |
| from unicy import main | |
| main() |
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
| class SaveDialog(Popup): | |
| def open(self, textinput): | |
| self.textinput = textinput | |
| super(SaveDialog, self).open() | |
| def save_man_2(self): | |
| path = str(''.join(self.ids.filechooser.selection)) | |
| path = path.replace('/','') | |
| path = path.replace('\\','/') | |
| rootpath = os.path.dirname(os.path.abspath(__file__)) |
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
| lkjaôlsfka ôdlf kajsd flskdf jaôslfd kaj+ ľščť ýáí= éíáä úň§ô-., | |
| כל הצלילים, התמונות והגופנים ב-childsplay ובמשחקים |
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
| import os, sys | |
| sys.stdin.close() | |
| sys.stdout.close() | |
| sys.stderr.close() | |
| os.close(0) | |
| os.close(1) | |
| os.close(2) | |
| sys.stdin = open('/dev/null', 'r') | |
| sys.stdout = open('/dev/null', 'w') |
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
| import os, sys | |
| sys.stdin.close() | |
| sys.stdout.close() | |
| sys.stderr.close() | |
| os.close(0) | |
| os.close(1) | |
| os.close(2) | |
| import kivy | |
| kivy.require('1.8.1') |
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
| import kivy | |
| kivy.require('1.8.0') | |
| from kivy.app import App | |
| from kivy.lang import Builder | |
| root = Builder.load_string(''' | |
| BoxLayout: | |
| orientation: 'vertical' | |
| Label: |