python library question

Hey!

I’m starting up a new game project, and trying to figure out what engine to use. I’ve got some existing code, which is implemented in python, that I’d like to use in the project.

I see that Unity uses Boo, instead of python, so I can’t just import the python code. I could run the python code as a separate process, and use message passing to communicate with it, but I’d prefer to actually incorporate it into the Unity project.

I was wondering if there was some way to compile the python code so that it could be imported by Boo or C#? Has anyone tried doing this? Or is there another easy way to use python code from within a Unity project?

Thanks,
-Lance

You’d have to rewrite the code. I don’t know what your code does, but it’s likely you’d want to rewrite it to use Unity features anyway. Shouldn’t take long to port it to Boo, and being able to use Unity would repay that effort many times over.

–Eric

Just a shot in the dark, but… You might be able to compile the python code using IronPython into a .dll, then use that in your project.