From BlenderWiki
BlenderWikiから

進行中で
10%
ただ始められる。
If you have any suggestions, please add them in the discussion page.
何か提案がありましたら議論ページでそれらを加える。
Thank you.
ありがとうございます。
[
edit
]
Why another Python tutorial?
なぜ別のパイソン・チュートリアル?
This page exists for two reasons.
このページは2つの理由で存在している。
-
To introduce Programming using Python 3.1 quickly and efficiently.
すぐに、効率的にパイソン3.1を使用することでProgrammingを導入するために。
-
And most importantly teach inside of Blender's Console, so you can learn in context.
そして、最も重要に、状況内において学ぶことができるように、BlenderのConsoleの内部を教える。
If you want to learn Python programming in general, you will find
very good tutorials here
.
一般に、プログラムを作るパイソンを学びたいなら、ここで非常に良いチュートリアルを見つける。
[
edit
]
What is Programming?
Programmingは何であるか?
Programming in simple terms is nothing more than manipulating data.
簡単に言えばプログラムを作るのはただデータを操作している。
Operations on the data either modifies it, or create new data.
データにおける操作は、それを変更するか、または新しいデータを作成する。
The simplest data is Numbers.
最も簡単なデータは民数記である。
Operations on Numbers are addition, Subtraction, multiplication etc., Its the simplest type of data imaginable.
民数記における操作は追加、乗法Subtractionであるなど、Itsは最も純真なタイプの想像可能なデータである。
But for solving real world problems, we need have compound data, that is built from simpler data like numbers.
本当の世界問題を解決せずに、私たちには、合成データがなければならなくて、それは数のような、より簡単なデータから建てられる。
A good example is Vector data type, that is built from 3 numbers.
好例はVectorデータ型である、それが3つの番号から建てられる。
During the course of this tutorial, we will take a look at what data types that Python language provides and how you can create your own custom data for your programs and also write operations that work with that data.
このチュートリアルのコースの間、私たちはどうしたらそのパイソン言語がどんなデータ型を提供するか、そして、あなたのプログラムのためにあなた自身のカスタム・データを作成して、また、そのデータでその仕事を操作に書くことができるかへの一見を取る。
[
edit
]
What is Python?
パイソンは者であるか?
Python
is an interpreted, interactive, object-oriented programming language.
パイソンは解釈されて、対話的なオブジェクト指向プログラミング言語である。
It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes.
それはモジュール、例外、ダイナミックなタイプ、非常に高い平らなダイナミックなデータ型、およびクラスを取り入れる。
Python combines remarkable power with very clear syntax.
パイソンは非常に明確な構文に顕著なパワーを結合する。
Learning Python is also very easy, even if you have never programmed before.
また、以前一度もプログラムを作ったことがなくても、Learningパイソンも非常に簡単である。
[
edit
]
Python Interpreter
ニシキヘビ・インタプリタ
All the exercises in this tutorial will be using the built-in Console window type in Blender 2.5, which has a Python 3.1 interpreter embedded in it.
このチュートリアルにおけるすべての運動がBlender2.5の内蔵のConsoleウィンドウ・タイプを使用している。(Blenderはパイソン3.1インタプリタをそれに埋め込ませる)。
Following is a video that shows how you can switch to the interpreter.
以下に、どうインタプリタに切り替わることができるかを示しているビデオがある。
You can start typing Python commands, expressions and statements at the interpreter prompt
>>>
インタプリタ迅速な>>>でパイソン・コマンド、式、および声明をタイプし始めることができる。
[
edit
]
Hello World
、こんにちは、世界的
Let's get started with the classical "Hello World" program.
古典的で開始しよう、「こんにちは、世界的である、」 プログラムを作る。
Type the following print statement at the interpreter prompt and press
?
インタプリタ・プロンプトとプレスで以下の印刷声明をタイプするか?
Enter
key.
キーを入れる。
Let's break down the above statement.
上の声明を破壊しよう。
-
"Hello World"
is a string
literal
in Python.
「こんにちは、World」はそうである。パイソンの文字列リテラル。
-
A string is a sequence of characters
五弦はキャラクタの系列である。
(numbers, alphabets, special characters)
(数、アルファベット、特殊文字)
-
A string is a sequence of characters
-
print()
is a built-in function in Python to print output.
印刷()はプリント出力へのパイソンの組込み関数である。
-
print("Hello World")
outputs
Hello World
to the console.
印刷、(「こんにちは、世界的である、」、)、コンソールにHello Worldを出力する。
-
Exercise
運動
-
Type the following commands and check the output
以下のコマンドをタイプする、そして、出力をチェックする。
print ( '"Hello World"' ) print ( "'Hello \n World'" ) ( '「こんにちは、World」' ) 印刷 を 印刷 する。 ( 「'、こんにちは、 \n 世界、'」 、 )
In Python, a string literal can be multiplied by a
number
.
パイソンでは、数を文字列リテラルに掛けることができる。
By doing so we are repeating the string by the count specified by
number
そうすることによって、私たちは数によって指定されたカウントでストリングを繰り返している。
-
number * string literal
数*文字列リテラル
-
string literal * number
文字列リテラル*数
-
*
is the multiplication operator in Python
乗算演算子はパイソンにいるか?
-
Note
注意
-
Check out
all the above examples in one place
.
1つの場所ですべての上記の例を調べる。