Sporadic Technical Rambling

Path Tool Long

Reading time: 5 minutes
windows python tool groovy nim

Over the last couple of years, I faced a Windows issue preventing me to delete directories or files with paths exceeding a certain size. Using the default Windows tools such as DEL, RMDIR, or Windows Explorer, resulted in errors The directory name ... is too long or The source file name(s) are larger than is supported by the file system.

Continue reading...

Fold Left and Right in Python

Reading time: 8 minutes
python haskell fold functional

Python exposes a number of built-in functions enriched with a plethora of modules composing The Python Standard Library. It is a pragmatic language that does not confine the developer in a specific programming paradigm. A Python developer can write imperative, procedural, object oriented or functional code. In Python, common functional constructs are available as built-in functions (e.g. map, filter, all, any, sum...). Additional higher-order functions are regrouped in the functools module (e.g. reduce, partial...). Prior to crafting some Python code, let's take a detour in some potentially more arcane areas of functional programming, in particular surrounding the fold concepts.

Continue reading...

This python recipe demonstrates how to use ShowHTMLDialog with Python, ctypes and comtypes on Windows.

Continue reading...

Bring Colors to the Windows Console

Reading time: 4 minutes
python windows

The recipe described in this post demonstrates how to write foreground and background colored text in a Windows Command Line with Python and ctypes.

Continue reading...

The previous Python Tip, XML Schema Validation with Python, MSXML and PyWin32, described how to use PyWin32 and MSXML to validate XML contents against an XML Schema. The adaptation to perform the same with comtypes instead of PyWin32 is a simple translation.

Continue reading...

Python ships with XML libraries, but none addressing XML Schema validation. Several options are available to make up for this feature. The solution demonstrated in this Python Tip is a basic implementation of XML schema validation using MSXML and PyWin32.

Continue reading...

Testing Java with Jython and PyUnit

Reading time: 10 minutes
python java jython testing

JUnit, the unit test framework written by Erich Gamma and Kent Beck, is not the only alternative for unit testing in the Java environment. This article provides a simple demonstration on how to use Jython, PyUnit and Ant to unit test a Java project.

Continue reading...

Javadoc To CHM

Reading time: 3 minutes
python java help tool

Javadoc To CHM is a Python tool that generates Microsoft HTML Help projects files from a Javadoc documentation. It generates the project file (.HHP), the contents file (.HHC) and the index file (.HHK). After having generated the HTML project files, Jd2chm invokes the Microsoft HTML Help Compiler (hhc.exe) with the project file (.HHP) as parameter in order to build the Compiled HTML file (.CHM).

Continue reading...