This is a library for network oriented, coroutine based programming. The
interfaces and events/operations aim to mimic thread features.
Coroutines work as simple generators, the operations and events work as
objects passed in and out of the generator, these objects are managed by the
scheduler/network poller.
Features
* basic scheduling priority management
* timeouts for operations
* fast network with epoll for linux platforms (select for win32)
* send file support
* signal events
* wsgi server
Available at:
http://pypi.python.org/pypi/cogen/0.1.0
Project page at:
http://code.google.com/p/cogen/
Any feedback is welcome.
--
ionel.
Dear Pythonistas,
the next monthly meeting of pyCologne, the Python User Group Köln, takes
place on:
Date: Wednesday Dec 12, 2007
Time: 6:30 Uhr pm c.t.
Venue: Room 1.08 , 1st floor, computing centre (RRZK-B)
Universität Köln, Berrenrather Str. 136, 50937 Köln
Around 8:30 pm we will head to a nearby establishment and have some
drinks, food and a friendly chat or maybe visit the Christmas market.
Further information about pyCologne, including directions, photographs
and minutes of past meetings etc., can be found on our page in the
German Python wiki:
http://wiki.python.de/pyCologne
CU,
Christopher Arndt
Greetings!
Mocker 0.10 has been released. The list of changes is provided below.
Where
-----
Links to files and documentation are available at:
http://labix.org/mocker
About
-----
- Graceful platform for test doubles in Python (mocks, stubs,
fakes, and dummies).
- Inspiration from real needs, and also from pmock, jmock,
pymock, easymock, etc.
- Expectation of expressions defined by actually using mock objects.
- Expressions may be replayed in any order by default,
- Trivial specification of ordering between expressions when wanted.
- Nice parameter matching for defining expectations on method calls.
- Good error messages when expectations are broken.
- Mocking of many kinds of expressions (getting/setting/deleting
attributes, calling, iteration, containment, etc)
- Graceful handling of nested expressions (e.g.
"person.details.get_phone().get_prefix()")
- Mock "proxies", which allow passing through to the real object on
specified expressions (e.g. useful with "os.path.isfile()").
- Mocking via temporary "patching" of existent classes and instances.
- Trivial mocking of any external module (e.g. "time.time()") via
"proxy replacement".
- Mock objects may have method calls checked for conformance with
real class/instance to prevent API divergence.
- Type simulation for using mocks while still performing certain
type-checking operations.
- Nice (optional) integration with "unittest.TestCase", including
additional assertions (e.g. "assertIs", "assertIn", etc).
- More ...
Changes in 0.10
---------------
- Greatly improved error messages and logic for expression ordering!
- Implemented MockerTestCase.addCleanup(). It allows one to
register cleanup functions to be called after the test is
complete.
- MockerTestCase now verifies if the mocker is put in replay
mode in cases where events were recorded.
- New MATCH() argument matcher, which allows using a function
to match an argument generically. E.g. MATCH(lambda x: x > 10)
- New 'path' option to MockerTestCase.makeFile() and makeDir(),
which allows setting the full target path with a single option.
- Now when a spec is provided (or with proxy/replace/patch) the
existence of the real method is checked even if the mocked
method doesn't execute. This is useful to detect API expectation
errors even if count(0) is used (a negative assertion).
- Implemented in MockerTestCase support for Deferred results as
understood by Twisted Trial's TestCase, so that coexistence by
multiple inheritance is possible and trivial.
- MockerTestCase.makeFile() with content=None (the default) now
consistently returns an unexistent temporary filename which
is properly cleaned up if created.
- Fixed problem when requesting order on similar expressions. The
second expression might not be accepted.
- When the expression executed isn't exactly the same as the
recorded events (e.g. when parameter matchers are used), show in
the error message the real expression run, to aid in debugging.
--
Gustavo Niemeyer
http://niemeyer.net
CodeInvestigator version 0.6.2 was released on December 10.
This version catches generate exceptions: Runs did not show when the
generate failed.
And a bug was fixed where variables did not underline when another
iteration was selected.
CodeInvestigator is a tracing tool for Python programs.
Running a program trough CodeInvestigator creates a recording.
Program flow, function calls, variable values and conditions are all
stored for every line the program executes.
The recording is then viewed with an interface consisting of the
code. The code can be clicked: A clicked variable displays its value,
a clicked loop displays its iterations.
You read code, and have at your disposal all the run time details of
that code. A computerized desk check tool and another way to learn
about your program.
http://sourceforge.net/project/showfiles.php?group_id=183942
Hi,
I've packaged up the minimal STM discussed over the past couple of days as a
standalone package which I've now uploaded
Getting it
==========
You can download a beta test version here:
http://thwackety.com/Axon.STM-1.0.0.tar.gz
Previewing it
=============
You can look at the sourcecode online here:
https://kamaelia.svn.sourceforge.net/svnroot/kamaelia/branches/private_MPS_…
Installing it
=============
~ > tar zxf Axon.STM-1.0.0.tar.gz
~ > cd Axon.STM-1.0.0/
~ > sudo python setup.py install
What IS it?
===========
Software Transactional Memory (STM) is a technique for allowing multiple
threads to share data in such a way that they know when something has gone
wrong. It's been used in databases (just called transactions there really)
for some time and is also very similar to version control. Indeed, you can
think of STM as being like variable level version control.
Note: Because this is NOT intended to be persistent, this is not an ACID
store because it doesn't support the D - durability across a crash. (after
all, we don't save the state to disk) (The other aspects atomicity,
consistency & isolation are supported though)
I've written this to allow a part of Kamaelia to share & manage a dictionary
of atomic values between threads simply, and as a result this code is also
going into mainline Kamaelia. (Specifically into Axon Kamaelia's core)
However STM is something that should hopefully be of use to others doing
concurrent *things* whether or not they're using kamaelia, hence this stand
alone release.
This stand alone release should *not* be used alongside mainline Axon yet.
(Well you can, as long as you reinstall your Axon over the top, but that's
icky :-)
Why is it useful?
=================
[ please skip this (or correct me :) if you understand concurrency
already :-) ]
Why do you need it? Well, in normal code, Global variables are generally
shunned because it can make your code a pain to work with and a pain to be
certain if it works properly. Even with linear code, you can have 2 bits of
code manipulating a structure in surprising ways - but the results are
repeatable. Not-properly-managed-shared-data is to threaded systems as
not-properly-managed-globals are to normal code. (This code is one way of
helping manage shared data)
Well, with code where you have multiple threads active, having shared data
is like an even nastier version of globals. Why? Well, when you have 2 (or
more) running in parallel, the results of breakage can become hard to
repeat as two pieces of code "race" to update values.
With STM you make it explicit what the values are you want to update, and
only once you're happy with the updates do you publish them back to the
shared storage. The neat thing is, if someone else changed things since you
last looked, you get told (your commit fails), and you have to redo the
work. This may sound like extra work (you have to be prepared to redo the
work), but it's nicer than your code breaking :-)
The way you get that message is the .commit raises a ConcurrentUpdate
exception.
Also, it's designed to work happily in code that requires non-blocking
usage - which means you may also get a "BusyRetry" exception under load. If
you do, you should as the exception suggests retry the action that you just
tried. (With or without restarting the transaction)
Apologies if that sounds too noddy :)
Docs for it
===========
http://kamaelia.sourceforge.net/STM
Using It
========
# Initialising a Store
from Axon.STM import Store
S = Store()
# Single values
greeting = S.usevar("hello")
print repr(greeting.value)
greeting.set("Hello World")
greeting.commit()
S.dump()
# Groups of values
D = S.using("account_one", "account_two", "myaccount")
D["account_one"].set(50)
D["account_two"].set(100)
D.commit()
S.dump()
D = S.using("account_one", "account_two", "myaccount")
D["myaccount"].set(D["account_one"].value+D["account_two"].value)
D["account_one"].set(0)
D["account_two"].set(0)
D.commit()
S.dump()
License
=======
Take your pick of MPL V1.1, GPL 2.0, LGPL 2.1 :-)
Feedback
========
Feedback is very welcome, preferably via email to the Kamaelia List
* kamaelia-list(a)lists.sourceforge.net
Feedback especially regarding bugs and logical errors is particularly
welcome. (hopefully there aren't any - but it's always hard to spot your
own)
Thanks
======
Many thanks to Fuzzyman, Duncan Booth, John J Lee & Sylvain Hellegouarch for
feedback whilst I was prototyping this.
Best Regards,
Michael.
--
Michael Sparks, Kamaelia Project
http://kamaelia.sourceforge.net/Developers/http://yeoldeclue.com/blog
=== Leipzig Python User Group ===
We will meet on Tuesday, December 11 at 8:00 pm at the training
center of Python Academy in Leipzig, Germany
( http://www.python-academy.com/center/find.html ).
Food and soft drinks are provided. Please send a short
confirmation mail to info(a)python-academy.de, so we can prepare
appropriately.
Everybody who uses Python, plans to do so or is interested in
learning more about the language is encouraged to participate.
While the meeting language will be mainly German, we will provide
English translation if needed.
Current information about the meetings are at
http://www.python-academy.com/user-group .
Mike
== Leipzig Python User Group ===
Wir treffen uns am Dienstag, 11.12.2007 um 20:00 Uhr
im Schulungszentrum der Python Academy in Leipzig
( http://www.python-academy.de/Schulungszentrum/anfahrt.html ).
Für das leibliche Wohl wird gesorgt. Eine Anmeldung unter
info(a)python-academy.de wäre nett, damit wir genug Essen
besorgen können.
Willkommen ist jeder, der Interesse an Python hat, die Sprache
bereits nutzt oder nutzen möchte.
Aktuelle Informationen zu den Treffen sind unter
http://www.python-academy.de/User-Group zu finden.
Viele Grüße
Mike
Python 3.0 will dispense with the rarely used, but occasionally
indispensible, bsddb185 module. I extracted the source code and unit tests
from the current Python trunk, wrote a setup.py, made a couple slight mods
so it would build and pass tests under both Python 2.6 and 3.0. It's
available from the Python Package Index:
http://pypi.python.org/pypi/bsddb185
Cheers,
--
Skip Montanaro - skip(a)pobox.com - http://www.webfast.com/~skip/
Hi group,
PSSC allow to see the Symbian S60 phone's display on a window of your Linux
PC , using bluetooth connections.
Here is the webpage and a video showing the standard scenario:
http://mulinux.sunsite.dk/python/pssc.html
Best regards,
Michele Andreoli
I am very pleased to announce that version 0.5.0 of Elixir
(http://elixir.ematia.de)
is now available. As always, feedback is very welcome, preferably on Elixir
mailing list.
This is mostly a bug fixes release, but we have also had some pretty
important changes to the default values for options. Please look at
http://elixir.ematia.de/trac/wiki/Migrate04to05 for detailed
upgrade notes.
The full list of changes can be seen at:
http://elixir.ematia.de/trac/browser/elixir/tags/0.5.0/CHANGES
What is Elixir?
---------------------
Elixir is a declarative layer on top of the SQLAlchemy library. It is
a fairly thin wrapper, which provides the ability to create simple
Python classes that map directly to relational database tables (this
pattern is often referred to as the Active Record design pattern),
providing many of the benefits of traditional databases without losing
the convenience of Python objects.
Elixir is intended to replace the ActiveMapper SQLAlchemy extension,
and the TurboEntity project but does not intend to replace
SQLAlchemy's core features, and instead focuses on providing a simpler
syntax for defining model objects when you do not need the full
expressiveness of SQLAlchemy's manual mapper definitions.
Mailing list
----------------
http://groups.google.com/group/sqlelixir/about
--
Gaëtan de Menten
http://openhex.org
People:
Well, after my hosting allowing CGI, I now improved *a lot* the
interface of this page.
Now you have more columns:
- Id
- Summary
- Priority
- Severity
- Components
- Versions
- Keywords
- Opened by (when)
- Temporal location
- Last update by (when)
And, the biggest enhancement, you can filter by any combination of:
- Priority
- Severity
- Component
- Version
- Keyword
As before, you have everything paged, and with a graph of activity per
day at the bottom.
Enjoy it!:
http://www.taniquetil.com.ar/facundo/py_tickets.html
Regards,
--
. Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/