Rod Persons Home Page

PyPanel Patch

From a discussion in the forums on BSDnexus, came the idea from a friend to create a patch for pypanel. I spent a day or so looking over the code and decided to give it a go. Here are the results.

This patch add two new functionalities to pypanel.
  1. Setting the width of the panel as a percentage of the screen.
  2. Aligning the pypanel by using the keyword RIGHT, CENTER or LEFT.
To set the width as a percentage you need to edit your pypanelrc file by setting the P_WIDTH variable to a percentage. So if you wanted the panel to be 50% of the screen you would set the variable like this.
P_WIDTH = ‘50%’

To set the alignment to right:
P_START = ‘RIGHT’

To set the alignment to center:
P_START = ‘CENTER’

To set the alignment to left:
P_START = ‘LEFT’

These changes DO NOT override the orignal way of setting the width and starting position.

This patch was created on FreeBSD 7.0 and tested also on FreeBSD 8.0. This is the 20080411.patch

For those using FreeBSD you can just download pypanel and replace your existing pypanel with this one. Make sure that it is executable.

Special thanks to Scott Robbins (scottro) for the idea and the testing.





Mail Convert

I need a script that would convert my email from the format that Claws Mail uses (MH) to a Maildir format so that I could use mutt to read my email.

I looked around the net for a few days and couldn't find anything so, I took a few hours over one day and whipped up this script. I'd call this a 0.0.1 release as I know it works for what I wanted, but I have tested it much beyond that. I'm working on some enhancements to allow it to convert to and from other formats.

Mailconvert is written in Python 2.5. It has no other requirements but that.

MailConvert_0.0.1
Right Click Save As..





Two Python scripts for text files. Row manipulation and swapping column

I created these two scripts because I had a need for them at work. Swap column swaps columns in a delimited text file with each other. Row Man, will allow you to remove duplicate rows, find only the unique rows, find duplicate rows and count the occurance if wanted. This script was written quickly and as a blueprint - but it works for my needs. Although I should clean it up and make it nicer

Swap Columns
Row Man
Right Click Save As..