NoteMe

DirectPython gives access to DX9 from Python:

I remember before DirectX 7 came out, there was a lot of different wrappers for DirectX 6 that Visual Basic programmers could use. I used my self a wrapper called DirectX C and had a lot of fun with it. But that is a long time ago, and after DX 7 came Visual Basic was supported, and then dropped again when DX 9 came out, but in stead replaced with .NET languages like VB.NET and C#.

Now it looks like it is happening again. I just stumbled over a SourceForge project that makes a DX9c wrapper for Python. Just like the old wrappers for Visual Basic.

The project is really in the beginning stage, but there is already about 15 samples on their homepage, and more is commming. So we just have to wait and see what the response from the Python community will be.

On the other hand, if you are not a big DirectX fan, you can always make simple games with for example PyGame and LiveWire . Might not be as impressive as DirectX games can be, but should get you let you have an easy start in the right direction if you want to start with game programming.
Comments 0

Firefox extension tool:

I have for a long time wanted to do this. And now I have done it. In the simplest way possible, but at least done it. Made a small tool to pack up and unpack the extension I have been working on for a while now. It has been a lot of packing and un packing, and finaly it can be done automaticaly with a pack script and an unpack script.

At the moment it only works on Linux machines with ZIP, and Python installed. And I am not going to change that for a while I think, since I am only using Linux to develop the extension. And at the moment some of the names are hardcoded for the files, so right out of the box it will only work for this extension. But it should be easy to change the names like vbf.jar to something that you use, and vbf.xpi to what your extension is called. And if you have any problems using it, then please just give me a wink.

If you just want to have a look at the code, here is the pack script:

Python code:


#!/usr/bin/python

import os
import sys


os.chdir("chrome/")

os.system("zip -r vbf.jar *")
os.system("mv vbf.jar ../")
os.system("rm -r *")
os.system("mv ../vbf.jar .")

os.chdir("..")

os.system("zip vbf.xpi -r chrome install.rdf")
os.system("rm ./install.rdf")
os.system("rm -r ./chrome")



And here you have the unpack script.

Python code:


#!/usr/bin/python

import os
import sys


os.system("unzip ./vbf.xpi")
os.system("rm ./vbf.xpi")

os.chdir("chrome/")

os.system("unzip vbf.jar")
os.system("rm vbf.jar")




How you use them:
Unpack: Leave the vbf.xpi file in the same folder as the unpack script, run the script and it is unpacked.
Pack: Leave the script in the same folder as the "chrome" folder and the "install.rdf" file, and run it. And it is packed again.

Enjoy. And please give me feedback if you need any help what so ever to use it. And just as a note, from the next version of the vBulleting extension these scripts will be in the vbf.xpi file.

Comments 0

Code snippets:

New year, new opportunities. Sorry for taking so long for the new update, but I believe it is a start of a good update period. I have been working on code highlighting during my vacation, and have made at least the start of a code/tutorial template page. It is a bit wider then this one. But I will make two versions of it. It should be too hard, but it is not number one in the cue right now. I uploaded it today, and you can find it in the menu too the right, under code snippets. I just uploaded the snippets that I had on file on this machine, but much more and more languages will come. Be sure. I had to lie dead some links, and take away some, so it won't look too unfinished, but they will be back. It is just a matter of time. So enjoy.
Comments 0
NoteMe - Øyvind Østlund