Software developer with over 30 years of experience.
Mastering Object-Oriented Python
More to follow... Stay tuned.
Building Skills in Programming
Building Skills in Object-Oriented Design
Stingray Schema-based File Reader
There are three kinds of flat files that are in common use for file transfers.
Spreadsheets. This includes .CSV format files which can be saved from a spreadsheet. The schema is often embedded as the first line.
Fixed Format Files. These are files without delimiters where some external schema is required to pick apart the fields.
COBOL files. These are fixed format files that also include EBCDIC or packed decimal data.
In all cases, the common theme is a schema to control file processing.
The value of Stingray is that application programs can be immune from physical format considerations. Various spreadsheet formats, include CSV, TAB, and Fixed format files can all be handled transparently.
Application programs can use the schema information to handle variability in logical layout. This makes applications simpler and more flexible.
This obsoletes the older COBOL DDE project.
When dealing with "flat files" from legacy COBOL problems, there are several problems that need to be solved.
The files have a fixed field layout, without delimiters. This means that the offset of each field must be used to decompose the record into it's individual elements.
Developing the offsets, signs, alignment, and redefines can only be done by parsing the "Copy Book", which has the original COBOL source definition for the file.
Numeric fields can have an implied decimal point, making if difficult to determine the value of a string of digits. The "Copy Book" is essential for parsing the file contents.
COBOL can make use of numeric data represented in a variety of "Computational" forms. The "Computational-3" ("COMP-3") form is particularly complex because decimal digits are packed two per byte and the trailing half-byte encodes sign information.
The string data may be encoded in EBCDIC.
COBOL encourages the use of data aliases (or "unions") via the REDEFINES clause. Without the entire suite of COBOL programs, the handling of REDEFINES can become an insoluable problem.
This library builds a schema via parsing DDE's to determine the offset, size, and encoding of each field. This information can be used by Python programs to process files that originate from COBOL systems.
A simple wrapper around VMware VIX that uses Python ctypes.
This allows simple and relatively complex access to the VIX functionality from Python. The idea is to allow sys admins to automate their VMware work flows.
Literate programming is an attempt to reconcile the opposing needs of clear presentation to people with the technical issues of creating code that will work with our current set of tools.
Presentation to people requires extensive and sophisticated typesetting techniques. Further, the "narrative arc" of a presentation may not follow the source code as layed out for the compiler.
pyWeb is a literate programming tool that combines the actions of weaving a document with tangling source files. It is independent of any particular document markup or source language. Is uses a simple set of markup tags to define chunks of code and documentation.
The pyweb.w file is the source for the various pyweb module and script files, plus the pyweb.html file. The various source code files are created by applying a tangle operation to the .w file. The final documentation is created by applying a weave operation to the .w file.
Revised 9/26/2011