views:

233

answers:

7

What is that needs to be coded in Python instead of C/C++ etc? I know its advantages etc. I want to know why exactly makes Python The language for people in this industry?

+6  A: 

Perhaps that's because it's a scripting language for Blender?

Mike Mazur
RC
+1  A: 

My guess is that it is the tool for the job because it is easy to prototype extra features.

monksy
+3  A: 

Because Python is what Basic should have been ;)

Its a language designed from the beginning to be used by non-programmers, but with the power to be truly used as a general purpose programming language.

voyager
+2  A: 

Aside from the fact that it's already in use, the main advantage is that it's quick to use. Java, C, and friends almost all require tedious coding that merely restates what you already know. Python is designed to be quick to write, quick to modify, and as general as possible.

As an example, functions in java require you to declare the type of each of the input variables. In python, as long as you pass input variables that work with the function, it's valid. This makes your code extremely flexible. You don't waste time declaring variables as one type or another, you just use them.

Some people will tell you that java produces code that is "more correct", but in animation and graphics, producing code that works in as short a time as possible is usually the goal.

Paul McMillan
+6  A: 

I work in this industry, and here's what I've observed:

  • It's a nice, tidy language that's not hard to pick up. You don't have to be a language guru to use it.

  • It embeds nicely in C/C++ applications.

  • It has data types, so numeric operations can be done without type shimmering.

  • Speaking of numeric operations, NumPy!

  • Network effect -- everybody else uses it, so we get a virtuous cycle of interoperable scripting.

Mark Harrison
+2  A: 

A few other points I've not seen in the existing answers:

  • it's free
  • it's fast [enough]
  • it runs on every platform I know of (AIX, HPUX, Linux, Mac OS X, Windows..)
  • quick to learn
  • large, powerful libraries
    • numeric
    • graphical
    • etc
  • simple, consistent syntax
  • the existing user-base is large
  • because it's easy-to-learn, you don't have to be a "programmer" to use it
warren
+1  A: 

I used python for molecular animation using PyMol. Many molecular visualization programs have their own scripting languages. PyMol's scripting language is python, a real programming language. So, if your task requires calculations of any kind, text parsing or calling the net, you are welcome. Before I assume that in "conventional" animation the situation is similar.

bgbg