Weblog Archives

You are currently browsing the archives for the Python tag.

ping.py – Python Implementation of the ping command

I’ve been looking for a pure python implementation of the ping command. Now that I found one, I am not sure if I want to use it, as it has a restriction: only privileged users can ping other hosts. I’ve used the ping command successfully as a normal user on all operating systems I have [...]

Descramble Passwords from gftp Bookmarks using Python

If you check the file where gftp keeps its bookmarks, you will notice that passwords are not stored in clear text. Instead, gftp has used an algorithm to scramble them. I cannot recall if it was one or two years ago when I had decided to write a script to convert the bookmarks from the [...]

Using the mod_dav_svn SVNParentPath directive with multiple authz files

I’ve been using the mod_dav_svn module for Apache, part of the subversion distribution package, in order to make several SVN repositories available over the HTTP protocol for quite some time now. More specifically, I use a multi-repository setup under the same virtualhost by using the SVNParentPath directive of mod_dav_svn. Also, the authorization policy is enforced [...]

Maximum URL Length

Normally, such pieces of information as the maximum length of a URL are completely useless. The developers of HTTP server and client software take good care of such details, so that they do not interfere with the user’s browsing experience. Yesterday, while trying to create a CGI version of a script, I realized that the [...]

VeriTAR – Verify checksums of files within a TAR archive

In my opinion, the biggest problem of the tar format (‘ustar‘) is that it does not store the checksums of the files it contains. So, in order to be able to verify the contents of the tar archive, you either need to keep the original data on the hard drive and compare the archive contents [...]

Upgraded to WordPress 2.3.1

I finally made the decision to upgrade WordPress to the latest 2.3.1 version. I skipped the initial v2.3 release as I had read that there was a lengthy list of bugs about that release, which eventually have been fixed in 2.3.1. Everything seems to run smoothly. I intend to spend some time browsing around my [...]

Fixed: tab-session-management.py now works with Python 2.5

This is a notice that I have updated the tab-session-management extension for Epiphany, so to make it work in environments that use Python version 2.5. This mainly involves the newest Fedora and Ubuntu distributions – at the time of writing. The plugin makes use of the cElementTree module, which has been moved into Python’s Standard [...]

Python IRC Bot

One of the things in which I never reached a decent level of knowledge is IRC. I mean I know the basic stuff in order to connect to servers, join channels, send/receive files etc. What I know nothing of is actually IRC server or channel administration… I am not going to learn or write more [...]

pygr2gl – Greek to Greeklish Converter

Inspired by Aggelos‘ greek to greeklish text converter implementation, I decided to write such a text converter in Python. It accepts text either from the stdin or by reading a file specified in the command line. It also auto-detects UTF-8 and ISO8859-7 encodings. Two sample text files are provided in the distribution for testing. Download: [...]

pdf2email CUPS Backend

pdf2email is a CUPS backend that uses GhostScript to print a document to PDF and sends the final file to the user that requested the print via email. This software is written in Python. I had written this backend a few months ago, it has worked fine for me, so I decided to release it. Your feedback is welcome.