Use components a lot, they are really really cool. (Sounds like zope3
components). One of the big tricks is to always access objects
through an interface. ISomethingDoer(o).doSomething()
.
Raviolli pattern, Risotto pattern, Lasagna pattern (layered). Spaghetti pattern. I don't know what he meant by it, but it sure sounds funny :-)
Documentation generation tool. "API docs are basically impossible for
mortals to generate", so he created something new. He didn't look at
prior art and thought it all over fresh from the start. Extracting
docstrings is the easiest part. It knows about zope.interface. It can
cope moderately with from xxxx import *
. It's still fairly small
(2500 lines). Not release yet, no website. (I found an svn
repo ).
Instancemanager helps you to manager your zope/plone instances. At Zest software it replaced custom made scripts that had to be adapted for every project.
Some things it can do: create a zope instance, grap products and fill
the Products directory, copy a pre-made Data.fs if available,
start/stop zope, quickreinstall all products, etc. You can also do
several things with a "combining" call: instancemanager vanrees
fresh
.
Products can be extracted from .tgz, .zip or can be symlinked from svn checkouts. Bundles can also be handled.
Future: two people use it on the server, so it needs a look at the safety aspect: wiping your production server isn't a good idea and instancemanager will currently happily oblige you if you ask it to do just that. Also: Jim Fulton talked about buildout today which does something similar.
Thunk is a way to do lazy evaluation. Sharedref allows python sessions to share variables: they're no copies, they're real variables. You can append something to a list in one running python and you get it updated in the other. Just a demo prototype, but much fun.
Sometimes you just want to treat your web app as a black box, just sending http stuff at it from the outside, behaving as a real user.
Selenium is too slow and it can't be automated (with for instance buildbot). Zope.testbrowser is a programmable browser. There are three variants, one for http connections, one for talking directly to the zope3 publisher and a last one for the zope2 publisher.
All variants can be recorded with the testrecorder. correction 2006-07-05: you can install the server-side testbrowser in almost every webserver, you just have to figure out how to hook it up. It is easy to install inside zope, of course. Note: you need to install on the server which you are testing.
From the testrecorder, you can generate python doctests (and selenium tests, but the doctests are handier for automatic testing).
(Talk by video)
Mercurial is written in python.
He read all the abstracts and got some statistics out of it. A word you didn't see a lot is "security". Googling for "Python programming" versus "python security": security is 1.7% of the "programming" results. For perl it is 2.2% and for PHP it is 13%. Either they do a lot for security of they have a big security problem.
He build a small demo website giving the programmer advise based upon his chosen technologies. So: what do we think of the site and do we have input on python-related common problems and pitfals?
Speed is measured as distance divided by time.
Someone at CERN said that only 4% of the matter in the universe is known. Well, we can say that there are a few things that don't exist: the tooth fairy, santaclaus and completely specified projects.
So the only distance points that really matter are the business idea and the process is implemented, revenue is created.
The time python takes between those points way less than with assembly or C, so python is faster than assembly.
Spreed is implemented in python for some 70-80%. Webcasts, conferencing, powerpoint sharing, etc. Spreed is available as software, as a service and as a hardware appliance.
Lxml is a python xml parser. Lxml is high performance, it is pythonic and it has lots of features. Not many of the other python xml libraries have all these three. lxml builds on libxml2, but has a much more pythonic interface than libxml2 itself has.
Some changes: there's a new maintainer that did loads of work. There is a 1.0 release and a 1.1 is in alpha. Lots of improvements. If you work with xml in python and you need high performance, pythonic api and lots of features: use lxml.
itools has a catalog engine.
With "property" he means those python new-style-classes that allow
you to have just obj.property
instead of obj.getProperty()
and
so.
Decorators allow you to do things like:
@property def feel(): #xxxxxxx
Doesn't really help when you also have a setter. He tried something
with @getproperty
and @setproperty
. Next try was using something
like:
class JamesBrown: class feel(classproperty): def getFeel(...) #xxxx def setFeel(...) #xxxx
PSF protects the python intellectual property, funds some research and organises pycon.
And.... Rob is going to raise money for the PSF tonight at the dinner by doing paid neck massages. (He's very good! I had one last year).
Demo on what you can automate on windows with pywinauto .
Treat a database as a neural net. You can investigate relationships, compensate for missing data, extrapolate values, etc.
Impossible to blog, all those screens of data, but it was pretty funny to see that it actually works a bit.
He'll have the python code up on the cookbook this evening.
One talk I didn't commit yet from this afternoon:
Tiny ERP manages accounting, sales/purchases department, stock/production, customer relationship management (CRM), project management, etc. The advantage is that it is integrated and extensible. The target market is small to medium businesses, they're not yet targetting the big customers.
The project was given wider publicity in 2005. There are 5 full-time developers at Tiny and they have some 23 partners in 11 countries.
One convenient feature is automatic partner segmentation: 20% of your customers deliver 80% of your sales, so tiny ERP allows you to filter them out.
The architecture is client/server, but it is server oriented: all the logic is on the server. The database layer is postgreSQL, the object layer is python and the view layer is in XML. The client has almost no logic, it communicates with the server using xml-rpc. Workflows are also defined in XML, but you can generate an image from it.
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):