Adding new python modules...

Hello,

New to Panda. I’ve got a question regarding modules. If I want to add some modules that you don’t have with your Python distribution I guess I’ll have to compile my own version of Python with the added modules and then make Panda a module? Is this correct?

Thanks,

Steve

Hmm,

13 views and no comments :slight_smile:

I guess I asked a stupid question. :frowning:

That’s what I did to get pygame working with Panda. You can do that perfectly :smiley:

It depends on the nature of the module you want to add. If it’s a pure Python module and it doesn’t require Python features newer than Python 2.2, you can just copy it in to Panda’s python/site-packages directory.

If it’s not a pure Python module, you will probably need to compile it for Python 2.2 specifically, but most third-party modules make that relatively easy.

If your module requires some version of Python other than 2.2, then it becomes more complicated. You will need to download the appropriate version of Python from www.python.org, and then get the Panda source and compile it yourself to use that version of Python.

David

Thanks for the replies.

I’m going to assume then that Panda isn’t tied to a specific version of Python for any reason except for probably a minimum version? If I wanted to use Python 2.4 I just need to recompile with the Panda source?

Steve

Oh and Panda.egg, I also want to get Pygame working with Panda as well!

I’m glad to hear its possible.

Steve

Yes, there’s nothing in Panda that is particular to a specific version of Python, to my knowledge. I have heard a rumor that some people were having difficulty using it with Python 2.4, but I don’t know any details about this and I haven’t tried it myself.

If there are difficulties associated with a particular version of Python, I expect they would be easily overcome.

David

I’ll try compiling on Linux and let you know how it goes (with Python 2.4).

Thanks,

Steve