Python Software

"The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code -- not in reams of trivial code that bores the reader to death." -- GvR

"Python is the second best programming language in the world. But the best has yet to be invented." -- Christian Tismer.

I am publishing here Python-related software; mostly written by me. Unless otherwise noted, all software is free for any use. Please, provide a reference to my name; don't blame me for anything. Copyrighted by Oleg Broytman and PhiloSoft Design.

Some pieces of software are not so free - they are protected by GNU GPL.

All bits are packed with GNU tar+ gz or bz2.

m_Lib library and programs: bookmarks_db, mimedecode.

Outdated code: extract_mime, netscape-history, bdftogd.
Network-related libraries and programs ... not much yet: Python socket servers.
Some miscellaneous staff: PyGreSQL example, comparison of 3 Python-for-DOS interpreters.

Legend:
Requires
The piece of software would not work without other; download it as well. "Requires: nothing" means "requires only standard Python library", of course.
Recommends
Does not strictly require, but good to have it anyway.
Suggests
Even easier than "recommends".

m_lib - Broytman Library for Python

A collection of modules I've been writing for common tasks in my programs. (You can read why the name starts with m :)
Download: m_lib.tar.bz2
git clone http://git.phdru.name/m_lib.git
git clone git://git.phdru.name/m_lib.git
Requires: nothing
Recommends: nothing
Suggests: nothing
See m_lib.txt.
The most interesting modules here are:
defenc.py
Get default encoding.
flad/
Flat ASCII Database; used in bookmarks_db.
pbar/
progress bar for tty; used in bookmarks_db.

Programs

Bookmarks database and Internet robot - a set of programs I use to manipulate my bookmarks. Detailed description is available.
License: GPL
Download: sources and example shell scripts
git clone http://git.phdru.name/bookmarks_db.git
git clone git://git.phdru.name/bookmarks_db.git
Requires: m_Lib, other_Lib
Recommends: Beautiful Soup, html5lib, lxml
Suggests: nothing
Inside the archive:
bkmk_objects.py
Low level objects (Bookmark, Folder, etc) and framework for managing bookmarks tree.
bkmk_parser/
HTML parser, just it is.
Programs:
bkmk2db.py
The program to convert bookmarks.html to a database.
db2bkmk.py
The program to convert the database back to bookmarks.html.
check_urls.py
The program checks URLs in the DB by running a robot (plugin).
convert_st.py
The program converts the DB to a different format.
sort_db.py
The program sorts the DB by add_date, last_visit, last_modified or size.
check_dups.py
Prints a list of duplicate URLs in the database.
Plugins:
Storage
Directory with storage managers (DB plugins).
Writers
Directory with writers (data dumpers) plugins.
Robots
Directory with robots (URL checkers) plugins

MIME decode - a program to decode MIME messages. Useful for multicharset mail lists archives and such. Detailed description is available.
Download: mimedecode.tar.bz2
git clone http://git.phdru.name/mimedecode.git
git clone git://git.phdru.name/mimedecode.git
Requires: m_Lib
Recommends: nothing
Suggests: nothing
Inside the archive:
mimedecode.py, mimedecode_version.py
The program.
mimedecode.docbook
Documentation source in DocBook format.
mimedecode.html, mimedecode.man, mimedecode.txt
Documentation in different formats.

Miscellanea

rgb - an example of how to use PyGreSQL (PostgreSQL<=>Python interface)
License: GPL
Download: rgz.tgz
Requires: PyGreSQL, PostgreSQL, web server
Recommends: rgb.txt from X11
Suggests: nothing
Inside the archive:
rgb_connect.py
Module that hides connection details; later if you want move/rename your database or programs, or change user/password, you just need to edit one file.
init_rgb.py
Program that parses rgb.txt (from X11, not included here) and put table of colors into rgb database. The database must exists, so run "createdb rgb" before init_rgb.py.
check_255.py
Very simple program that checks whether color parts are (not) exceeds 255.
init_rgb_checked.py
The same as init_rgb.py, but it combined with check_255.py.
rgb.cgi
CGI script that draws colors from rgb database and generates HTML table full of colors. The program wants one parameter "cube=N", where N is integer 1..8 - these are just 8 subcubes of big color cube.

Outdated code

skype4py-patches - 3 patches for Skype4py, the most notable is a patch to prevent segfaults.
License: Public domain
Download: skype4py-patches.tar.bz2
Requires: Skype4py
Upd. The patches were incoroprated into Skype4Py.
Inside the archive:
segfault.patch
Initialize GLib to prevent segfaults.
exec.patch
Fixed the number of parameters for execlp call to start skype.
systembus.patch
Allow to choose SystemBus instead of SessionBus on D-Bus.
combined.patch
Combined patch - all three in one.

other_Lib - modules written by other people.
License: unknown
Download: other_lib.tgz
Requires: nothing
Recommends: nothing
Suggests: nothing
Inside the archive:
strptime.py
This is rather old module that come before time.strptime() appeared in standard Python library (1.5.2). I extended it a bit and added Russian names for days, months, etc (both koi8-r and windows-1251 encodings).
html.py
My version of Neale Pickett's html.py - object-oriented HTML generator.
subproc.py
My version of Ken Manheimer's subproc.py. It is now off the web, seems to be obsolete. I still use it in bookmarks_db.
timeoutsocket.py
A copy of timeoutsocket.py.

mCorrect - Some patches I made for standard library. Now mostly obsolete. Detailed description is available.
Download: mcorrect.tgz
Requires: nothing
Recommends: nothing
Suggests: nothing
Inside the archive:
tempfile.py, tempfile.diff
DOS-related patches.
os.py, os.diff
DJGPP-related patches.
dospopen.py
Low-level classes to help implement DOS version of popen(). Actual implementation is in os.py.

Extract MIME - template programs that show how to write tools to extract MIME attachments from incoming mail messages. Detailed description is available.
Download: extract_mime.tgz
Requires: nothing
Recommends: nothing
Suggests: nothing
Inside the archive:
extract_mime.py
The template program.
extract_mime
Shell wrapper to use extract_mime.py from /etc/aliases or such.

Netscape history dump/load - a pair of programs I used to manipulate Netscape browser's history.
Download: netscape-history.tgz
Requires: Berkeley DB 1.85 and builtin module bsddb
Recommends: nothing
Suggests: nothing
Inside the archive:
dump
The program to dump history file to a text file. The program is based on Netscape history file lister by Hannu Krosing.
load
This is the opposite to dump - it loads the text file back to netscape history file.

bdftogd.py and mk_gdfonts - programs to convert BDF (XWindows) fonts to GD format.
Download: bdftogd.py and mk_gdfonts
Requires: m_Lib
Recommends: nothing
Suggests: nothing
Description:
bdftogd.py
Program to convert BDF (XWindows) fonts to GD format. Tested with gd 1.2.
mk_gdfonts
Shell script to generate all gd fonts in once.
My colleague Vitus Wagner maintaied a page with Cyrillic fonts, converted from fonts created by Sergey Vakulenko. Fonts tested with gd 1.2.

I wrote now old and outdated comparison of 3 Python-for-DOS interpreters.


This is the page http://phdru.name/Software/Python/. It was generated on Mon, 17 Mar 2014 23:19:15 GMT from CheetahTemplate index.tmpl. Some rights are reserved. Read more about technical aspects of the site.