[Chicago] Python is so good to me
Atul Varma
varmaa at gmail.com
Sun Jun 3 18:19:56 CEST 2007
On 5/9/07, Tim Saylor <tim.saylor at gmail.com> wrote:
>
> Jon,
>
> I used to think the same thing, then I took a data mining class and
> wrote one of those algorithms in python. That was a nightmare.
> Python is great, just remember to use C when it's warranted. (And do
> most of that work through SWIG anyway ;) )
Great to hear that you found Python helpful, Jon. Feel free to ask any
questions on this list, or on the Python Tutor list:
http://mail.python.org/mailman/listinfo/tutor
As for C--this is a little off-topic, but there's lots of options as far as
that goes, and I think a pretty lengthy article could be written on it
(assuming one doesn't already exist). For instance, if one's only goal is
to make their Python code run faster, then they may first want to try using
a Just-In-Time Specializer like psyco that transparently speeds up existing
Python code, or a number of existing Python C extensions like numpy. If one
needs to access third-party, pre-existing C code, then they may want to look
into ctypes, which comes with Python 2.5 and allows Python code to interact
with shared libraries without depending on external, heavy-weight, and often
platform-specific and version-sensitive tools like a C compiler/linker, a
build system, and utilities like SWIG. SWIG is particularly ideal for
situations where one needs to make pre-existing C++ code accessible from
Python, but different circumstances call for different tools, so it's
prudent to do some research and ask around a bit before committing to a
particular solution.
- Atul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/chicago/attachments/20070603/9f65f510/attachment.htm
More information about the Chicago
mailing list