ADAM'S WEB PRESENCE

16 August 2009

Metamorphosis

Filed under: General — adam @ 10:18 pm

A picture of a butterfly
I realise I’ve been a bit dark lately with my blog with very minimal posting over the last few months. A lot of things have been changing around here. My wife and I have swapped roles. That’s right, I’m the housewife now and she has a full-time job.

I’m still doing some contract work here and there but am spending most of my time looking after the kids and doing housework. To be perfectly honest, I’m enjoying it. Its really nice to take a break from full-time work, the first time I have not been working flat-out in about twelve years.

So where to from here? While kids and housework keep me reasonably busy, I’m not the kind of guy who can just sit around. So I’m planning to create some products for sale. I’ve set up a new site called siliconsparrow.com where I will base my professional operations. I am excited about the possibilities.

Unfortunately it means this blog will become a bit neglected. I’ll only be posting personal and hobby stuff here, and perhaps more housewife-related stuff like recipies!


10 August 2009

Parallel port control in Python

Filed under: Nerd Notes — adam @ 11:11 am

Controlling the parallel port has always been a pain in Windows 2000, XP and later. In DOS or older versions of Windows you could just write a byte directly to port 0×378 and that was it.

Now you can get the same level of simplicity using inpout32.dll and Python. Go here to download the DLL and you can access it from Python just as easily as it used to be under DOS. The following example writes the number 5 to the parallel port:

import ctypes

ctypes.windll.inpout32.Out32(0x378, 5)


UPDATE: I have made a simple demo app using this technique. You can download it from my commercial website at http://siliconsparrow.com/parallel-port-tester-in-python/.


Powered by WordPress