views:

150

answers:

2

Hello,

I have been programming in Python for a few years now and have always used CPython without thinking about it. The books and documentation I have read always refer to CPython too.

When does it make sense to use an alternative distribution (PyPy, Stackless, etc)?

Thanks!

A: 

I think it's clear when to use IronPython or Jython. If you want to use Python on CLR/JVM, either as the main language or a scripting language for your C#/Java application.

Lukáš Lalinský
+6  A: 

If you need native interfacing with the JVM, use Jython.

When you need native interfacing with the .Net platform, or want to use Winforms, use IronPython.

If you need the latest version, cross-OS support, make use of existing C-based modules existing only for CPython, the use it.

If you are thinking into proposing a functional PEP, going the Pypy route could be useful.

If you need to do something that Python makes hard (i.e. microthreading), you could go the Stackless way, or any other language (Haskel, etc.).


The alternative implementations are always behind CPython, most now target 2.5.

Both Jython and IronPython are good ways to sneak in Python into MS-only or Java-only shops, generally through their use for unittests.

voyager