New Exception Hierarchy In Python 3.3+

Working with the new stable version of Python 3.3, I stumbled upon the new exception hierarchy. Specifically, I was working on some file-related routines and found in the release notes, that for this domain a new set of exceptions is introduced and that IOError is now OSError.

Things are ...

more ...

New Python Project “Pym-elFinder”

The PySite project needs a decent UI to manage the pages and to up-/download files. The current milestone of PySite envisions that UI to use the metaphor of a file manager, for which elFinder seems a good implementation. Its current version is 2.0RC1, but ...

more ...

Copying Data Structures Quirks

Note

TL;DR — Copying fails if a value is an iterator.

To create a duplicate of a data structure, Python provides methods copy() and deepcopy(). Lately, I wanted to duplicate a nested structure with deepcopy() and encountered following issue:

TypeError: object.__new__(dict_keys) is not safe, use dict_keys.__new__()

And ...

more ...

New Python Project “PySite”

If there’s a bunch of small websites you want to maintain, — who you’re gonna call?

Introduction

For just a few pages, it may be tempting to just write static HTML files. If you just write them once and do not have to apply changes ...

more ...

Dialoge

Moritz Eisner, Kriminalkommissar aus Wien auf Urlaub, unterstützt seine Freundin Kommissarin Roxane Aschenwald bei der Aufklärung eines Mordes. Er betritt das örtliche Gasthaus, um einen Kaffee zu trinken.

Wirtin: Und, wissen mir schon etwas?

Eisner: Also, ich weiß nichts. Und was Sie wissen, weiß ich nicht.

Wirtin: Was soll i ...

more ...