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
cdef inline void observable_list_dispatch(object self): | |
cdef Property prop = self.prop | |
obj = self.obj() | |
if obj is not None: | |
prop.dispatch(obj) | |
class ObservableList(list): | |
# Internal class to observe changes inside a native python list. | |
def __init__(self, *largs): |
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
def scroll_after_add(self): | |
if not self.scrolling: | |
available_height = self.height | |
index = self._index | |
while available_height > 0: | |
item_view = self.adapter.get_view(index) | |
if item_view is None: | |
break | |
index += 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
def delete_data_item(self, item): | |
if item in self.data: | |
index = self.data.index(item) | |
if item in self.selection: | |
self.dispatch('on_selection_change') | |
self.data.remove(item) | |
self.dispatch('on_data_item_delete', index) | |
def delete_data_item_at_index(self, index): | |
if 0 <= index < len(self.data): |
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
bin/pip install -r https://raw.github.com/Kotti/Kotti/master/requirements.txt | |
Traceback (most recent call last): | |
File "bin/pip", line 5, in <module> | |
from pkg_resources import load_entry_point | |
ImportError: No module named pkg_resources |
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
3 Downloading/unpacking Babel==0.9.6 (from -r https://raw.github.com/Kotti/Kotti/master/requirements.txt (line 1)) | |
4 | |
5 Getting page http://pypi.python.org/simple/Babel | |
6 URLs to search for versions for Babel==0.9.6 (from -r https://raw.github.com/Kotti/Kotti/master/requirements.txt (line 1)): | |
7 * http://pypi.python.org/simple/Babel/0.9.6 | |
8 * http://pypi.python.org/simple/Babel/ | |
9 Getting page http://pypi.python.org/simple/Babel/0.9.6 | |
10 Getting page http://babel.edgewall.org/ | |
11 Could not fetch URL http://pypi.python.org/simple/Babel/0.9.6: HTTP Error 404: Not Found (Babel/0.9.6) | |
12 Will skip URL http://pypi.python.org/simple/Babel/0.9.6 when looking for download links for Babel==0.9.6 (from -r https://raw.github.com/Kotti/Kotti/master/requirements.txt (line 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 kivy.uix.widget import Widget | |
from kivy.properties import ListProperty | |
from kivy.properties import FloatProperty | |
class GraphicsElement(Widget): | |
label = StringProperty('') | |
# label_containment is either ``inside`` or ``outside`` the element. |
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)ibis~/Development/kivy/contrib/kivy(mrbob|…) % cdvirtualenv 1 ↵ | |
(kivy)ibis~VIRTUAL_ENV % ls lib/python2.7/site-packages | |
Cython coverage-3.6-py2.7-macosx-10.4-x86_64.egg hgext pip-1.2.1-py2.7.egg setuptools-0.6c11-py2.7.egg | |
Cython-0.17.4-py2.7.egg-info cython.py mercurial pygame setuptools.pth | |
PIL cython.pyc mercurial-2.4.2-py2.7.egg-info pygame-1.9.2pre-py2.7.egg-info | |
PIL.pth easy-install.pth nose-1.2.1-py2.7.egg pyximport |
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('{{{ kivy.target_version }}}') | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.app import App | |
from kivy.properties import ObjectProperty, StringProperty | |
class {{{ widget.class_name}}}(FloatLayout): | |
'''{{{ widget.description }}} |
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 kivy.uix.modalview import ModalView | |
from kivy.uix.listview import ListView | |
from kivy.uix.gridlayout import GridLayout | |
from kivy.lang import Builder | |
from kivy.factory import Factory | |
# Note the special nature of indentation in the adapter declaration, where | |
# the adapter: is on one line, then the value side must be given at one level | |
# of indentation. |
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
def events_below_context(self, context, request, permission='view'): | |
""" | |
Get recursive all children of the given context. | |
:result: List with all children of a given context. | |
:rtype: list | |
""" | |
tree = nodes_tree(request, | |
context=context, | |
permission=permission) |