Kent's Python Programs
The following programs are command-line tools I've converted from Perl (see myperl.html). I'm sharing them 'as-is' with no guarantees.You may copy, use, or modify them, as long as you leave my name in the code. All were developed on Unix systems (Solaris, FreeBSD), but they should run on Windows and Mac OS, too, if you have Python available. Python version 3 is assumed unless otherwise noted.
These programs are intended to be run from a command line (Unix/Linux, for example).
The links below go to pages that provide usage notes, example runs, assumptions of the programs as well as links to view the program code, and download the programs.
- cklg.py: Check a SAS log file for errors, warnings and other issues Output is in QuickFix format for use with the Vim editor.
- Using Vim's QuickFix functions, the output of this program supports jumping to the line of the error or warning in your SAS log. Or you can use the output directly to guide your debugging. This is the Python version of cklg.pl.
- More SAS-related content can be found on my Vim Functions for SAS Programming page. It includes a way to integrate cklg into gvim, as well as how to set gvim up for SAS development.
- freq2.py: Compute frequencies for column data (LRECL). Good for quick frequency checks on raw data in column format.
- detab.py: Convert tabs to spaces in files two ways. Don't expect miracles detabbing text files saved by word processors. They tend to make a mess of them. Try each method and see which one works best. You'll likely still need to do some manual cleanup.
Back to Kent's Home Page
Last Modified: Thu Mar 19 11:48:50 EDT 2026
Back to Kent's Home Page