written by Georg, on Thursday, August 9, 2007 19:16.
Finally, Guido has killed the "p3yk" branch and renamed the "py3k-struni" branch to "py3k".
This means that the "all strings are now unicode" transition is pretty complete, and deemed stable enough to be the new Python 3000 development branch. You can help weeding out the remaining bugs and failing tests by testing it too:
Check out http://svn.python.org/projects/python/branches/py3k and start messing around with it!
Tagged as:
py3k, python
|
0 comments
written by Georg, on Saturday, July 21, 2007 11:10.
[as posted to the Python mailing lists]
Dear fellow Pythonistas,
as you may have heard, Python is going to get a new documentation system soon [1]. As part of that effort, and in order to maintain the excellent quality of the docs, we are looking for members of the maintainers team. This is your chance to get involved with Python development!
There will be two main objectives of the group, or maybe two subgroups can
be formed:
- Maintaining the documentation contents:
- processing user submitted comments, bugs and patches
- helping out developers with docs-related matters, keeping an eye on commits to ensure quality
- keeping the docs up-to-date, e.g. write new sections for new Python 3000 features
The docs source will be in reStructuredText, which is already known to a relatively high percentage of Python developers.
The new online version of the docs will contain features to add comments and suggest changes, so it is expected that there will be some amount of user involvement.
- Development of the toolset:
- fixing bugs in the package
- adding new output formats, e.g. info or pdf
- adding new features to the web application
- adapting it to new docutils features
The software is written in pure Python. It is currently located in the docutils Subversion repository, at http://svn.berlios.de/viewcvs/docutils/trunk/sandbox/py-rest-doc/
The README file gives you a rough idea what you find there and how to get started, all other questions can be directed to georg@python.org, I'll answer them gladly.
An additional objective in the near future will, of course, be handling the switch to the new system.
Okay, so you've read until here? And you're interested in joining the team? Wow! Write to the
docs@python.org and become a documentation maintainer!
cheers,
Georg
[1] see
http://pyside.blogspot.com/2007/06/introducing-py-rest-doc.html for some details, and
http://pydoc.gbrandl.de:3000/ [2] for a demo. (Commenting doesn't work yet, but it's worked upon fiercely...)
[2] the demo server is a small vserver with the application served by a single wsgiref instance, and as such not fit to handle large amounts of requests, so it may well be that you don't get good reponse times.
Tagged as:
docs, python
|
0 comments
written by Georg, on Thursday, July 12, 2007 10:06.
Today I closed my 1000th Python tracker issue, after around 2 years of involvement. Yes, that's roughly 1/10 of all closed items on the SourceForge tracker; I can't believe it myself.
Not that they all were hard to get closed, some pretty percentage were invalid bug reports or old, outdated patches, but I feel satisfied nevertheless that I was able to help the project so much.
*goes back to work on the docs*
4 comments
written by Georg, on Sunday, July 8, 2007 12:30.
You've probably already seen that, but it's so absurd that I have to write about it:
http://www.steorn.com/orbo/claim/Yes, they produce energy out of nothing. You can read all about their (unsurprisingly unsurprising) “demonstration” and their claims somewhere else...
0 comments
written by Georg, on Sunday, July 8, 2007 12:19.
Sphinx, the
Python reST documentation tool, can now build an “HTML” help project ― with that, you can compile a CHM file that is quite useful for local help reading.
Among the files used in the “HTML” help project is a contents file which looks like an ordinary HTML file containing an unordered list tree of <object> tags:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Main page">
<param name="Local" value="index.html">
</OBJECT>
[...]
It took me more than an hour to get this to work with the “HTML” Help Workshop since I made a fatal mistake: I generated code that looked like
[...]
<UL>
<LI>
<OBJECT type="text/sitemap">
<param name="Name" value="Main page">
<param name="Local" value="index.html">
</OBJECT>
Can you spot the difference? Now you know why I put quotes around “HTML”...
0 comments
written by Georg, on Saturday, July 7, 2007 14:00.
For a recent project (which is not going to be very useful for the general public; it's a daemon that lets users create Apache virtual host configurations and checks them according to a policy before integrating it in the global config file), I needed some means of communication between the daemon run as root and the client program run by the user.
For that, Unix domain sockets are a nice and clean solution. However, if you want to authenticate the client from the daemon process (all that follows is probably Linux-specific), googling around suggests that you need to use the
sendmsg() and
recvmsg() socket functions, which Python doesn't export.
(There's a patch at http://python.org/sf/1194378, but it hasn't got much interest yet.)But, as I've found out (of course, after implementing my own feeble authentication scheme), there is another possibility: using a simple
socket.getsockopt(). It is then as easy as
SO_PEERCRED = 17
pid, uid, gid = struct.unpack('3i', sock.getsockopt(
socket.SOL_SOCKET, SO_PEERCRED, struct.calcsize('3i')))
to get at the client process' process, user and group IDs.
Tagged as:
linux, python
|
3 comments
written by Georg, on Wednesday, June 27, 2007 19:00.
It's one month after the release of
Pygments 0.8, so I decided to release a bugfix version with all the collected fixes so far, nothing important.
While I work on my
Python documentation project, Pygments' development is a bit slow, but I'll process bug reports and feature wishes for 0.9 in due time, I promise.
Tagged as:
pygments, python
|
0 comments
written by Georg, on Saturday, June 23, 2007 22:59.
If you read the python-dev mailing list, you have probably already known that for the last few months I worked on a new framework for the documentation of Python.
The current toolchain uses LaTeX input files, combined with a few custom Python scripts. These are processed either by latex itself to produce the printable version ready to download at
docs.python.org, or by a heavily customized latex2html (yes, in Perl) to produce the static HTML pages on that server. Users who want to contribute to the docs are referred to the SourceForge issue tracker.
This has worked well so far, but it has two downsides:
- The generated HTML is static and it is hard to customize the output as well as add nice user participation features.
- The imaginary barrier for potential contributors is high.
(I say "imaginary" because LaTeX markup really isn't that hard after all, and devs have offered to mark up text-only contributions. Still, experience shows that users perceive it as complicated to contribute to the docs.)
This is why the new framework does two things:
- It uses the widely-known (in the Python community) reStructuredText as its markup language.
- It can create both static HTML pages for distribution, and a web application for serving at docs.python.org, with participation features like commenting and "suggest-a-patch".
Of course, these are not the only "new" features that the new framework has, but they are the most convincing ones.
If I wanted to boast, I would probably mention that
- all function/class/module names are properly cross-referenced
- you have a quick dispatcher, mock-URL: http://docs.python.org/urllib.urlopen
- Python and C code snippets are syntax highlighted
- there's a builtin search function
- the index is generated over all the documentation, making it easier to find stuff you need
- the toolchain is pure Python, therefore can easily be shipped
- the HTML pages are generated from proper templates, using a language similar to Django's template language
But as I'm modest, I won't mention it. :D
Of course, the whole thing is a long way from finished, but
you can see a preview here.
(The interactive features might not work as expected, also this is just a tiny server, so bear with its slowness.) If you have comments or questions, just drop me a line: georg at python org!
In case you wonder, the app is WSGI-based and served by a simple wsgiref server.
Also, I have to give credits to Armin for most of the design and for much of the web app code.
By the way, the thing that kept many people from even trying to change the Python docs' source format was how to parse and convert the LaTeX. That I managed to do it should be proof that it isn't that hard at all :)
Tagged as:
docs, python
|
12 comments
written by Georg, on Saturday, June 23, 2007 22:45.
Yes, another blog about Python. I know you all feverishly waited for it, so I couldn't resist :)
0 comments