Tuesday, May 24, 2005

Put your data inside column

I came across a problem where I had to send across data in neatly formatted column (only text). I designed a small python script column.py that lets me put data in column with wordwrap and allows customization of column border.
COLUMNS IN VERTICAL DISPLAY
+------------------+
|*This.is.test.data|
+------------------+
+------------------+
|*This.is.test.....|
|datas.............|
+------------------+
COLUMNS IN HORIZONTAL DISPLAY
+------------------++------------------+
|*This.is.test.data||*This.is.test.....|
|..................||datas.............|
+------------------++------------------+
[UPDATE: I implemented report.py using column.py, which will generate formatted work report. The input for report.py is datafile. See output.]

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?