[TransWarp] PEAK Tutorial

Ulrich Eck ueck at net-labs.de
Thu Nov 14 05:23:42 EST 2002

Hi Phillip,

> The first steps for creating a context are:
> 1. Decide if it will be a Basic, Read, or Write context.  A "basic"
> context can really only look things up, or check if the name exists --
> effectively __getitem__ and has_key() operations.  A "read" context can
> also iterate (think keys(), values(), items(), etc.), and a "write"
> context can have objects bound or unbound in it (think __setitem__,
> __delitem__, and rename).
> 2. Subclass AbstractContext (found in peak.naming.contexts).  Define a
> "_get()" method, based on the instructions found in the source of the
> base class.  This will get you a "basic" context.  Add an __iter__ method
> if you want a read context, and so on.
> If you'll take a look at these steps and bring me your questions, I'll
> help you through it.

Thanks !!

I think a naming context for the Pyro-Distributed-Object-System could
make a nice (and usefull) example. All this stuff is quite lightweight
and it should be easy to understand and test for others as well.

we'll start this stuff soon .. prepare for our questions :)


Ulrich Eck
net-labs Systemhaus GmbH
Ebersberger Str. 46
85570 Markt Schwaben
fon:   +49-8121-4747-11
fax:   +49-8121-4747-77
email: ueck at net-labs.de

More information about the PEAK mailing list