• Welcome to Valhalla Legends Archive.
 

Good libraries for Python?

Started by idoL, April 04, 2005, 10:26 AM

Previous topic - Next topic

idoL

I'm using Redhat 9.1 preinstalled with Python 2.1, could other Linux developers link me to good tools and or libraries?

Banana fanna fo fanna

Python 2.1!? What planet are you on? www.python.org, get 2.4. I'll give you a comprehensive list of cool stuff

NETWORKING
Twisted: www.twistedmatrix.com

GAMING:
pyGame: www.pygame.org
PyOpenGL: pyopengl.sf.net
PyODE: pyode.sf.net
PySonic: pysonic.sf.net

PERFORMANCE
Psyco: psyco.sf.net

NATIVE CODE STUFF
EDIT: whoops, didn't see you say Linux :) ctypes should still work.
Pythonwin: pywin32.sf.net
ctypes: http://starship.python.net/crew/theller/ctypes/
adder (runtime patching of executables...good for game hacks): http://lists.virus.org/bugtraq-0403/msg00360.html

GUIs:
wxPython: www.wxpython.org
Boa constructor: boa-constructor.sf.net

COOL STUFF
Logix: logix.livelogix.com <--- I think that's one of the coolest things ever


WEB
My own personal project: subway.python-hosting.com
CherryPy: www.cherrypy.org
The flagship Python web environment, Zope: www.zope.org
Free zope hosting: www.objectis.net

idoL

Quotehttp://www.pygame.org/

That's really impressive, wasn't aware you could do big games with Python.

Thanks for all the links, this page is now in my book marks for Python refrences.

idoL

I am having problems with numarray, I'm using a numerical
computation of planet and probe orbits. There for I created a body
class, representing an gravity affected mass (like a planet or a probe).
Now I have different bodys each with it's own position, velocity and
mass that pull each other together by gravity.
Based on the previous
position and velocity I'm now calculating the positions and velocity for the next timeframe and so on... So I get a quite high amout of data  because i have to store (number-of-bodys)*(number-of-timeframe) objects.

Question: how can I use a numarray to store the body objects?

Banana fanna fo fanna

To tell you the truth, I don't know how to use numarray. You might be interested in PyODE, which is a 3d physics librarya.

idoL

#5
Yeah, this is why I was asking for some good (recent) librarys because Numarray, if I recall (since reading the Python changelog)  is a re-implementation of an older Python array module called Numeric. I'm used to Numeric. :( The numarray call features seems more diffacult to remember then anything else. Buuut it's great for large numerical calculation.

Here's my (early module-developement) code just for kicks:

    standard_generator = CreateGenerator(-1)

and:
    def ranf():
            "ranf() = a random number from the standard generator."
            return standard_generator.ranf()
   
#using ranf.c for the (random) generator strings
    ...
    if(*s < 0){ /* 48 */
        s48[0] = s48[1] = 0;
        Setranf(s48);
        Getranf(s48);

$ python
    Python 2.4.1 (#1, April 5th 2005, 19:15:02) ...
    > >> from numarray import *
    > >> from RNG import *
    > >> for i in range(3):
    ...    standard_generator.ranf()
    ...
    0.58011364857958725
    0.95051273498076583
    0.78637142533060356
    > >>

    $ python
    Python 2.4.1 (#1, April 5th 2005, 20:45:02) ...
    > >> from numarray import *
    > >> from RNG import *
    > >> for i in range(3):
    ...     standard_generator.ranf()
    ...
    0.58011364857958725
    0.95051273498076583
    0.78637142533060356
    > >>

Banana fanna fo fanna

Numeric is old, Numarray "replaced" it, and then they decided to remake numeric: http://numeric.scipy.org/

Yegg

I suggest using http://forums.devshed.com for Python questions. It seems that Banana fanna fo fanna is one of the only people on these forums who knows the Python language.