2010
Le « monde » Python
by ghis & 2 othersPresentation of Python and its ecosystem. Useful librairies mentionned at the end of the presentation.
2007
PyOpenGL -- The Python OpenGL Binding
by jdrsantos & 4 othersPyOpenGL is the cross platform Python binding to OpenGL and related APIs. The binding is created using the SWIG wrapper generator, and is provided under an extremely liberal BSD-style Open-Source license.
ImageMagick: Convert, Edit, and Compose Images
by jdrsantosImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick
Pinder | The Pit | oluyede.org
by jdrsantosPinder is a Campfire API for Python developers. Campfire is an online chat application created by 37signals.
ReportLab - Open Source Software
by jdrsantos & 2 others# The ReportLab Open Source PDF library (the ReportLab Toolkit) - our proven industry-strength PDF generating solution, that you can use for meeting your requirements and deadlines in reporting systems
# PyRXP - the fastest validating XML parser availab
Genshi - Trac
by jdrsantosGenshi is a Python library that provides an integrated set of components for parsing, generating, and processing HTML, XML or other textual content for output generation on the web. The major feature is a template language, which is heavily inspired by Ki
Twisted – Trac
by jdrsantos & 4 othersTwisted is an event-driven networking engine written in Python and licensed under the MIT license.
APSW - pysqlite - Trac
by jdrsantosAPSW is a Python wrapper for the SQLite embedded relational database engine. In contrast to other wrappers such as pysqlite it focuses on being a minimal layer over SQLite attempting just to translate the complete SQLite API into Python. This section desc
13 New, Improved, and Removed Modules
by pvergainThe ctypes package, written by Thomas Heller, has been added to the standard library. ctypes lets you call arbitrary functions in shared libraries or DLLs. Long-time users may remember the dl module, which provides functions for loading shared libraries and calling functions in them. The ctypes package is much fancier.
To load a shared library or DLL, you must create an instance of the CDLL class and provide the name or path of the shared library or DLL. Once that's done, you can call arbitrary functions by accessing them as attributes of the CDLL object.
import ctypes
libc = ctypes.CDLL('libc.so.6')
result = libc.printf("Line of outputn")
Type constructors for the various C types are provided: c_int, c_float, c_double, c_char_p (equivalent to char *), and so forth. Unlike Python's types, the C versions are all mutable; you can assign to their value attribute to change the wrapped value. Python integers and strings will be automatically converted to the corresponding C types, but for other types you must call the correct type constructor. (And I mean must; getting it wrong will often result in the interpreter crashing with a segmentation fault.)
You shouldn't use c_char_p with a Python string when the C function will be modifying the memory area, because Python strings are supposed to be immutable; breaking this rule will cause puzzling bugs. When you need a modifiable memory area, use create_string_buffer():
s = "this is a string"
buf = ctypes.create_string_buffer(s)
libc.strfry(buf)
C functions are assumed to return integers, but you can set the restype attribute of the function object to change this:
>>> libc.atof('2.71828')
-1783957616
>>> libc.atof.restype = ctypes.c_double
>>> libc.atof('2.71828')
2.71828
1969
1
(20 marks)