Valhalla Legends Forums Archive | General Programming | Good libraries for Python?

AuthorMessageTime
idoL
I'm using Redhat 9.1 preinstalled with Python 2.1, could other Linux developers link me to good tools and or libraries?
April 4, 2005, 3:26 PM
St0rm.iD
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
April 5, 2005, 12:12 AM
idoL
[quote]http://www.pygame.org/[/quote]

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.
April 5, 2005, 3:36 PM
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?
April 5, 2005, 3:49 PM
St0rm.iD
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.
April 6, 2005, 7:28 PM
idoL
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:

[code]    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);[/code]
[code] $ 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
    > >>[/code]
April 6, 2005, 11:24 PM
St0rm.iD
Numeric is old, Numarray "replaced" it, and then they decided to remake numeric: http://numeric.scipy.org/
April 7, 2005, 1:45 AM
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.
April 13, 2005, 10:48 PM

Search