» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with Python + zope

icalendar 2.0.1 released

***Note!***: This change is incompatible with earlier behavior, so if you handle EXDATE and RDATE you will need to update your code.

Zope: Planet Zope

Restarting zope for plone development

Essential knowledge for the Plone developer who doesn't like to work 13-hour days.

XML: del.icio.us/tag/xml

Setuptools distribution_links Considered Harmful

distribution_links foils repeatability

Zope: Planet Zope

site-packages is too implicit

Dear site-packages, I am breaking up with you. No, it's not you, it's me.

rm -rf PasteDeploy-1.3.1-py2.4.egg rm -rf Routes-1.7.3-py2.4.egg rm -rf WebHelpers-0.3.2-py2.4.egg rm -rf Beaker-0.9.5-py2.4.egg rm -rf FormEncode-0.7.1-py2.4.egg rm -rf decorator-2.2.0-py2.4.egg rm -rf nose-0.10.3-py2.4.egg rm -rf Mako-0.1.8-py2.4.egg rm -rf WebOb-0.9.2-py2.4.egg rm -rf simplejson-1.7.1-py2.4.egg rm -rf Babel-0.9.2-py2.4.egg rm -rf Pylons-0.9.6.2-py2.4.egg rm -rf Genshi-0.5-py2.4-macosx-10.5-i386.egg rm -rf SQLAlchemy-0.5.0beta1-py2.4.egg rm -rf ToscaWidgets-0.9.2-py2.4.egg rm -rf TurboGears2.egg-link rm -rf Paver-0.8.1-py2.4.egg

import sys sys.path[0:0] = [ '/Users/kteague/buildouts/shared/eggs/PasteDeploy-1.3.1-py2.4.egg', '/Users/kteague/buildouts/shared/eggs/Routes-1.7.3-py2.4.egg', ]

/Users/kteague/buildouts/shared/eggs/Routes-1.7.3-py2.4.egg /Users/kteague/buildouts/shared/eggs/Routes-1.9-py2.4.egg

Neither of these are active on your Python path, but you can pop them onto your sys.path and import the version you require as desired. This approach means that your application declares what versions of which packages it wants to use

import sys sys.require('PasteDeploy','1.3.1')

This is similar to the approach that Ruby Gems takes. I'm not sure if it's better than the buildout approach, since this approach embeds your library dependency information in the source code instead of having that information available in an easily parsed buildout.cfg or setup.py file.

Zope: Planet Zope

Ten Years of Python Web Programming

Looking back at ten years of programming web applications with Python, and musings on what lies ahead.

Zope: Planet Zope

A misconception about the ZODB

from persistent import Persistent

class Source(Persistent): def __init__(self, ref): self.ref = ref

class Target(Persistent): def __init__(self, message): self.message = message

>>> c = Target("First message") >>> c.message 'First message' >>> a = Source(c) >>> b = Source(c) >>> c.message = "Second message" >>> a.ref.message 'Second message' >>> b.ref.message 'Second message'

from ZODB import FileStorage, DB from persistent import Persistent import transaction

class Source(Persistent): def __init__(self, ref): self.ref = ref

class Target(Persistent): def __init__(self, message): self.message = message

def getroot(): # open the database storage = FileStorage.FileStorage('/tmp/mystorage.fs') db = DB(storage) conn = db.open() dbroot = conn.root() return dbroot

def main(): dbroot = getroot()

if 'a' not in dbroot: print "Filling database" fill_database(dbroot) else: print "Reusing existing database" # reset to first message dbroot['c'].message = 'First message'

a = dbroot['a'] b = dbroot['b'] c = dbroot['c']

print "message through a:", a.ref.message print "message through b:", b.ref.message print "ref is the same:", a.ref is b.ref print "ref is indeed c:", a.ref is c print "changing message c to: Second message" c.message = 'Second message' print "message through a:", a.ref.message print "message through b:", b.ref.message

# commit any changes to the database transaction.commit()

def fill_database(dbroot): dbroot['c'] = c = Target('First message') dbroot['a'] = a = Source(c) dbroot['b'] = b = Source(c)

if __name__ == '__main__': main()

was created by Brandon Rhodes and Noah Gift for IBM developerworks.

Zope: Planet Zope

My Experience Writing a Build System

$ build-something target-directory/ (much time passes) Error: cannot write /home/ianb/builds/20080426/target-directory/products/AuxInput/auxinput/config/configuration.xml

Zope: Planet Zope

Python 3 will make you a better programmer.

One example is using the keys of a dictionary as a list. For example, this code is valid in 2.x: d = {'key1': 'value1', 'key2': 'value2', 'key3': 'value3', } d.values()[1]

for i in len(d.keys()): key = d.keys()[i]

Zope: Planet Zope

Zope.org

Zope is an open source application server for building content management systems, intranets, portals, and custom applications. written in Python, a highly-productive, object-oriented scripting language

opensource: del.icio.us tag/opensource

Writing Bad Unit Tests

We write bad unit tests sometimes.

Zope: Planet Zope

Zope3 on App Engine - Redux

zope.deprecation-3.4.0-py2.5.egg zope.publisher-3.5.2-py2.5.egg appengine_monkey-0.1dev_r28-py2.5.egg zope.dottedname-3.4.2-py2.5.egg zope.schema-3.4.0-py2.5.egg zope.event-3.4.0-py2.5.egg zope.tal-3.4.1-py2.5.egg zope.exceptions-3.5.2-py2.5.egg zope.tales-3.4.0-py2.5.egg zope.i18n-3.4.0-py2.5.egg zope.testing-3.5.1-py2.5.egg transaction-1.0a1-py2.5.egg zope.i18nmessageid-3.4.3-py2.5-macosx-10.5-i386.egg zope.thread-3.4-py2.5.egg zope.component-3.4.0-py2.5.egg zope.interface-3.4.1-py2.5-macosx-10.5-i386.egg zope.traversing-3.5.0a3-py2.5.egg zope.configuration-3.4.0-py2.5.egg zope.location-3.4.0-py2.5.egg zope.deferredimport-3.4.0-py2.5.egg zope.pagetemplate-3.4.0-py2.5.egg

Initial Request Zope Load Time -0.588495016098 Subsequent Request Zope Load Time -0.000102996826172

Zope: Planet Zope

Zope3 on Google App Engine

- 1000k file limit - restricted python language

functionally, it isn’t a typical zope environment in any sense, its a collection as an application using zope egg components. there isn’t any zodb, but thats not really an issue for most of the zope core components. potentially though existing components could be used with some sort of modification to use null/dummy implementations as was done for zope.deferredimport.

Google app engine maintains a hard limit on the number of files in an application. See

$ find . -type f | wc -l 4980

$ ls -al | wc-l 139

Zope: Planet Zope

New project: python-incompatibility. Is Python 3.0 really incompatible?

But the code isn’t finished yet. There may be incompatibilities I haven’t thought about, and there are no tests of the library reorganisation. Please help out on this! It’s fun, easy and a great way to learn Python 3.0!

Zope: Planet Zope

Thanks for the testing help + conclusions.

So, what is the conclusion, and the result? The conclusion is that you can not reliably figure out the time zone name on your computer. And that in turn affects how to fix a particular

Zope: Planet Zope

Political Loyalties in Web Frameworks

There are at least two distinct forms of web framework styles: "right-leaning" and "left-leaning" (in the political sense).

Zope: Planet Zope

Page 1 | Next >>