Skip to content

Instantly share code, notes, and snippets.

View rbanffy's full-sized avatar
🎯
Focusing

Ricardo Bánffy rbanffy

🎯
Focusing
View GitHub Profile
max = None
for i in range(5):
num = input('Digite um numero ')
if num > max:
max = num
print max
ricardo  harlan  ~  projects  appengine-fixture-loader  master  $  LC_CTYPE="en_US.UTF-8" python setup.py register -r pypitest
running register
running egg_info
writing Appengine_Fixture_Loader.egg-info/PKG-INFO
writing top-level names to Appengine_Fixture_Loader.egg-info/top_level.txt
writing dependency_links to Appengine_Fixture_Loader.egg-info/dependency_links.txt
reading manifest file 'Appengine_Fixture_Loader.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: rbanffy
[pypitest]
ricardo  harlan  ~  projects  appengine-fixture-loader  master  $  LC_CTYPE="en_US.UTF-8" python setup.py register
running register
running egg_info
writing Appengine_Fixture_Loader.egg-info/PKG-INFO
writing top-level names to Appengine_Fixture_Loader.egg-info/top_level.txt
writing dependency_links to Appengine_Fixture_Loader.egg-info/dependency_links.txt
reading manifest file 'Appengine_Fixture_Loader.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
--- a/src/collective/composition/composition.py
+++ b/src/collective/composition/composition.py
@@ -91,19 +91,37 @@ class Composition(dexterity.Container):
#TODO: Think of a way to register available tiles
# And from here, just ask which tiles are available for this
# context
- available.append({'tile_type': "collective.composition.richtext",
+ available.append({'tile_type': "collective.composition.tiles.richtext",
'icon': '',
'title': "Rich text tile",
{% for c in breadcrumbs %}
<a href="{{ c.url }}">{{ c.title }}</a>
{% if not loop.last %}&gt;&gt;{% endif %}
{% endfor %}
@@ -88,7 +88,8 @@ if PYTHON_VERSION < (2, 6):
# patch for this bug in tarfile module - http://bugs.python.org/issue1719898
if PYTHON_VERSION == (2, 4):
- from tarfile import nts, GNUTYPE_SPARSE, normpath
+ from tarfile import nts, GNUTYPE_SPARSE
+ from os.path import normpath
def frombuf(cls, buf):
"""Construct a TarInfo object from a 512 byte string buffer.
--------------- quintagroup/transmogrifier/adapters/importing.py ---------------
index 70f21ae..57e3bcd 100644
@@ -11,9 +11,23 @@ from collective.transmogrifier.interfaces import ITransmogrifier
from quintagroup.transmogrifier.interfaces import IImportDataCorrector
+from xml.parsers.expat import ExpatError
+
EXISTING_UIDS = {}
REFERENCE_QUEUE = {}
@@ -10,14 +10,17 @@ from collective.transmogrifier.utils import defaultMatcher
from OFS.interfaces import IPropertyManager
from Products.GenericSetup.utils import PropertyManagerHelpers, NodeAdapterBase
+import logging
+logger = logging.getLogger('quintagroup.transmogrifier.propertymanager')
+
class Helper(PropertyManagerHelpers, NodeAdapterBase):
""" We need this class because PropertyManagerHelpers in _initProperties
method uses _convertToBoolean and _getNodeText methods from
<?xml version="1.0"?>
<object name="portal_workflow" meta_type="Plone Workflow Tool">
<property
name="title">Contains workflow definitions for your portal</property>
<bindings>
<default>
<bound-workflow workflow_id="simple_publication_workflow"/>
</default>
</bindings>
</object>