Windows-Python-PyInstaller GitLab CI Runner

Posted on Wed 16 November 2016 in blog

Here I'll explain how to configure a Windows Server VM to act as a Python (PyInstaller) build server, running as a GitLab CI runner.

Procedure

Install Windows Server 2012 R2 "Server Core"

This is left as an exercise to the reader :-)

Enable Remote Desktop

Simply follow this detailed guide:

Windows …


Continue reading

Named Pipes between C# and Python

Posted on Thu 13 December 2012 in blog

There's a lot of over-complicated information on the internet for communicating between a C# process and a Python process using named pipes on Windows. I'll start with the code:

In this example, I implement a very simple protocol, where every "message" is a 4-byte integer (UInt32 in C#, I (un …


Continue reading

A real Python parse integer function

Posted on Wed 21 September 2011 in blog

Is anyone else annoyed by the fact that int() in python is retarded and can't tell the difference between decimal, hex, and octal?

Your solution:

def parseint(val):
    if isinstance(val, int):
        return val
    if not isinstance(val, (unicode,str)):
        return None

    try:
        if val.startswith('0x'):
            return int(val …

Continue reading