Skip to content

{ Category Archives } MSWin-dev

How to create an enlightened development environment for developing software on Microsoft Windows.

More Colored Terminal text on Windows: AnsiCon

A reminder for myself: ANSI escape characters don’t work properly in Windows terminals: To make them work properly, use AnsiCon. Unzip it somewhere permanent (eg. %ProgramFiles%\ansicon) and install it with: ansicon.exe -i start a new terminal, and lo: Fine tune the appearance of the programs generating the color, for example customise ‘hg diff’ by editing [...]

colorama: Simple cross-platform Python API for colored terminal text

Announcing new Python package, colorama: http://pypi.python.org/pypi/colorama ANSI escape character sequences have long been used to produce colored terminal text on Unix and Macs. Colorama makes this work on Windows, too. It also provides some shortcuts to help generate these ANSI sequences, and works fine in conjunction with any other ANSI sequence generation library, such as [...]

Acceptance Testing .NET Applications using IronPython

The following was originally published in the excellent Python Magazine. Thier contractual exclusivity period has now long expired, so here it comes again. Many thanks to my technical reviewer Michael Foord, and to the editors Brandon Craig Rhodes and Doug Hellmann, who patiently gave excellent and much needed guidance through its protracted gestation, and especially [...]

Howto bundle binary dependancies with py2exe, et al.

Hey. I notice that py2exe-users has a recent question that seems to be about how to correctly bundle the required Microsoft C runtime DLL with executables generated from Python scripts. Last month I updated the py2exe wiki tutorial to cover this issue, as best as I was able. Since people are still asking questions about [...]

MSWindows Programming : Propogating child process exit values out of .bat scripts

“God dammit. Why won’t you just DO what I WANT you hopeless pile of crap!” So goes the refrain. I think you know where I’m coming from. Yet again, I have ended up learning far more about crappy DOS scripting than I ever wanted to know. So I’m writing a program to automate some small [...]

My Fonts Look Crap. I blame Windows and ATI.

I know, I know. But I use Windows for 8 hours a day at work. So what do you do? Here’s the poster-boy for programmer-friendly fonts, your friend and mine, everyone loves him, Inconsolata: (Update: I evidently have some javascript or CSS trickery that squashes these images horizonally if your browser is narrow, to make [...]

Set your Prompt

It’s a tiny detail, but the default command-line prompt (on both Windows and Unix) drives me nuts. See how my cursor is way over on the right. So every command you ever type gets immediately split over two lines. This is governed by the PROMPT environment variable. It’s the Windows equivalent of the Unix PS1 [...]