Monthly Archives: November 2008

ctypes based iocp proactor for cogen

I’ve finally mannaged to pull off a set of wrappers for using the raw windows iocp api using ctypes, namely wrappers for GetQueuedCompletionStatus, WSARecv, WSASend, AcceptEx, ConnectEx, TransmitFile and the whatever structs and utility calls they need.
Writing the wrappers wasn’t that hard – but if you aren’t careful with ctypes you are in a world [...]

Javascript-Flash socket bridge with haxe

There are a bunch of solutions for making a bridge to use the flash sockets (flash.net.Socket) in javascript, notably socketBridge and jssockets. But I didn’t like the way they made you write your client code: because you can’t pass javascript function references through the ExternalInterface you usually pass your callbacks as strings representing the name [...]

setuptools install_requires quirk

It’s interesting that having “dev” version packages in the install_requires list will fail.
Say for example, if you do:

from setuptools import setup
setup(

install_requires=["Pylons==dev"],

)

It won’t work:

Installed d:\python25\lib\site-packages\pylons-0.9.7rc3dev_20081103-py2.5.egg
Reading http://www.pylonshq.com/download/0.9.7
error: Could not find required distribution Pylons==dev

I imagine it would match if the package would literally have the version “dev”.
One solution is to change the install_requires to ["Pylons==dev,!=foo"] or some other [...]