What version of Python does Blender use and are other languages available? Also, does Python work the same in Blender as when you write console applications or when working with Pygame or are there any differences? If so, what are the main differences?
Since Blender 2.5 only Python 3 is supported. From blender.org:
The Blender 2.5x versions feature a completely new Python API based on Python version 3.2, and is integrated deeply, used for generating Blender's GUI layouts, for import and export of external formats, and with access to all user-accessible data and functionality.
What changes across applications is the API - Application programming interface. So if you're used to pygame and console API, now you need to learn Blender API. So yes, the idea is the same, but the API is different.
Blender only supports Python3 for scripting, and currently there are now plans to support other languages natively.
There are however a few ways to use other languages from Python.
Use CPython to Execute Other Languages
Its possible to generate CPython bytecode directly.
Bridge CPython to Other Runtimes
Call out to other languages From CPython
You could also look into LLVMPy, PyOpenCL or Cuda for Python, see this answer: https://blender.stackexchange.com/a/3159/55
Execute external processes
Theres nothing special about this, you can simply write out some XML/JSON/ANYFORMAT file from Blender's Python API, then load that file into any other runtime as an external process. operate on it, then read the data back in.
In some cases this is useful, but often its more trouble then its worth to write & read the data back into Blender.
Though I really would recommend just learning Python syntax, while its possible to side-step this, most/all? solutions to do so are not 100%... (no auto-completion in the console for example), defining callbacks to give to Blender... this kind of integration you loose.
Besides Python 3.x Blender supports:
- GLSL OpenGL Shading Language which also supported in the game engine for materials or postprocessing
(compiled at runtime by the OpenGL driver)
- OSL - Open Shading Language for Cycles Shaders
(compiled at runtime by Blender's bundled OSL library)
Blender 2.5 and above use python 3 but latest versions of Blender 2.6x utilize python 3.3 as the main scripting language. See the Blender API documentation. Blender Education & Help has more details if you are new to Blender.
The Blender API is significantly different to pygame, but if you are comfortable with Python programming that won't be an obstacle.