... hab' ich mitzuteilen - L's blog

... with a touch of python - Didaktik der Informatik, Informatische Bildung, ...
Sun, 17 Sep 2006
[Python Cookbook] ISBN-13 converter [ 11:49 Uhr ] [ 124 Worte ]
Thu, 14 Sep 2006
Tue, 12 Sep 2006
[Python Cookbook] Lego Mindstorms Bluetooth interface [ 22:16 Uhr ] [ 110 Worte ]

[Python Cookbook] Lego Mindstorms Bluetooth interface «The new Lego Mindstorms NXT brick has an on-board Bluetooth transceiver that can connect to a serial port service on a PC. The NXT uses a simple format to pass raw bytes between connected Bluetooth devices. This interface allows the NXT brick to be controlled from Python.»
[ rss20 Feed ] http://www.pythonware.com/daily/rss2.xml [ Verweis - Nachrichtenkanal ]

[ xhtml ] http://www.pythonware.com/daily/index.htm#115801935635369955 [ Verweis - Eintrag ]

Wed, 30 Aug 2006
Erich Schubert: Ajax is devolution [ 22:11 Uhr ] [ 192 Worte ]
Tue, 29 Aug 2006
Enrico Zini: evaluating-languages [ 21:34 Uhr ] [ 327 Worte ]

Evaluating programming languages for playing with Debtags

Since having workable bindings for the C++ Debtags libraries seems to be still a bit in the future, I'm planning to build a bit of native infrastructure in some higher level language. First step is seeing what language I could start playing with.

The problem

At the most basic level, in Debtags we have a number of packages, each of which have a set of tags.

The way I usually save tags is a file with the format:

package1, package2: tag1, tag2, tag3 package3: tag1, tag2 

That is, every line has a list of packages with the same tags, and the list of their tags.

Since any script I'm going to write has to at least be able to parse the data into something like a package -> tags hash, then print it out.

Let's see how perl, python and ruby perform.

Tests

C++

...

Perl

...

Python

Then comes Python. I'm not much of a Python fancier, but I'm rather attracted by the new set native type introduced with Python 2.4, which seems to have most of what I need nice and done.

...

Ruby

Finally, Ruby. I like to use Ruby. In this case, however, it lacks a native set implementation, although it has a set module which is implemented using a hash.

...

Results

As much as I don't fancy Python, it looks like it's currently the best choice for playing around with Debtags. I hope the native sets will bring me joy.

If in the future I'll be asked 'how come you chose Python for this Debtags thing?', I can point to this page.

Sat, 26 Aug 2006 06:01:50 +0000
[ rss20 Feed ] http://planet.debian.net/rss20.xml [ Verweis - Nachrichtenkanal ]

[ xhtml ] http://www.enricozini.org//2006/debtags/evaluating-languages.html [ Verweis - Eintrag ]

Tue, 22 Aug 2006
Mon, 21 Aug 2006
[Python Cookbook] xor for strings [ 21:20 Uhr ] [ 66 Worte ]
Fri, 18 Aug 2006
Dr. ODF: Examining OpenDocument Format with Python, Part 1 [ 20:43 Uhr ] [ 429 Worte ]

ODF meets Python ;-)

There’s been so much talk over the last 18 months about ODF, the OpenDocument Format, that I decided that I wanted to take a look inside a file in that standard format. In particular, I wanted to take a very simple word processor document and see how it was saved on disk. What information is in there and how is it represented? How does this change when the document becomes more complicated?

I also wanted to play with some of the basics of how I could access this information without using any of the usual applications for processing ODF, namely OpenOffice, IBM Workplace Managed Client, and KOffice. Therefore I decided to try to write some simple Python code to help in the examination. The programs I mentioned are written in C++ and I’m not allowing myself to look at how they do anything. I am allowing myself to use Python libraries but only if they are general purpose ones. That is, I would be cheating if I used any Python ODF code I might find on the web.

My primary source of information will be the OASIS specification for the OpenDocument Format itself. I can also use my pre-existing knowledge of the format which is mainly:

  1. The format contains several parts to represent the document.
  2. XML is used to represent the document data.
  3. The content and structure of the document (for example, the words and paragraphs) are separate from the formatting information (for example, whether a word is bold and green and in a big font).
  4. The parts are zipped to keep them together as well as reduce the amount of space they take on disk.
...

[ Datum/Zeit: ] 2006-08-17T10:30:24Z

[ Quelle: ]
Robert S Sutor
[ rss20 Feed ] http://www.sutor.com/newsite/blog-open/?feed=atom [ Verweis - Nachrichtenkanal ]

[ xhtml ] http://www.sutor.com/newsite/blog-open/?p=987 [ Verweis - Eintrag ]

Mon, 14 Aug 2006
[Python Cookbook] thread2 -- killable threads [ 21:28 Uhr ] [ 115 Worte ]

Das Problem mit »normalen« Threads in Python besteht darin, dass sie sich nur selbst beenden können. Mit thread2 wird diese Einschränkung überwunden.

[Python Cookbook] thread2 -- killable threads «A little module that extends the threading's module functionality -- allows one thread to raise exceptions in the context of another thread. By raising SystemExit, you can finally kill python threads :)»
[ xhtml ] http://www.pythonware.com/daily/rss2.xml [ Verweis - Eintrag ]

[ xhtml ] http://www.pythonware.com/daily/index.htm#115554474397972593 [ Verweis - Eintrag ]

Sun, 13 Aug 2006

<<  0 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  >>


Inhalte unterliegen dem Copyright von L. Humbert.
Creative Commons License
Die Inhalte stehen unter einer Creative Commons License.