Archive for python

Building PyBullet on Windows

Posted in How To, Programming with tags , , , on 2011/05/24 by Adam Griffiths

PyBullet is a wrapper around the popular Bullet C++ physics library.

Once you’ve build the C++ Bullet library you can then build PyBullet.

The PyBullet documentation states to use the –include-dirs directive to add the Bullet include path, but it also requires the numpy include directory which didn’t resolve automatically for me. Unfortunately you can’t just append it to the –include-dirs flag.

I resolved it with the following:

cd path\to\PyBullet

set INCLUDE=%INCLUDE%;c:\path\to\python\site-packages\numpy\core\include

python setup.py build_ext –include-dirs c:\path\to\bullet\src –library-dirs c:\path\to\bullet\msvc\2008\lib\Release

Obviously you replace the \msvc\2008 directory with the appropriate one if you didn’t build the vanilla target.

After this, copy the file PyBullet\build\lib.win32-2.6\bullet\bullet.pyd to PyBullet\bullet.

Include the PyBullet\bullet directory in your Python project and import.

You should now be able to do the following:

import bullet.bullet as bullet

print help(bullet)

First Milestone

Posted in Development with tags , , on 2011/03/07 by Adam Griffiths

Over the last week I’ve written and re-written my Python framework about 6 times. Yesterday and today I re-wrote the core messaging framework again and I’ve just gotten to what I would consider the first milestone! Very exciting.

Python Multiprocessing with ZeroMQ

Posted in Programming with tags , on 2011/02/22 by Adam Griffiths

Good example of ZMQ with Python and multiple processes.

Also found an issue with the example code which I have fixed below (and included a comment on the original blog post).

Continue reading

Sometimes you spend forever designing your house of cards to be rebust only to find the bricks were beside you all along

Posted in Development, Rant, Shock, Twisted Pair with tags , , , , on 2011/01/11 by Adam Griffiths

I’ve spent the last 5 years designing my C++ library Shock. It’s basically designed to let me create a number of games I’ve always wanted to make with a massive amount of code re-use and a number of other niceties thrown in.

I’ve been experimenting with Python and it’s opened my eyes to the flexibility of modern programming languages. I think it’s what I should be developing in.

I’ve coded C++ since uni. It’s what I do for a living. But the irony is, I hate C++. It’s not just that I work with it all the time and have had bad experiences, C++ is truly horrible. And the sad thing is, it’s so pervasive that we can’t shake it.

Continue reading

Design a site like this with WordPress.com
Get started