Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
en:chapter1 [2019/06/10 15:31] hlinke [Introduction] |
en:chapter1 [2019/07/28 10:24] hlinke [Hello World] |
||
---|---|---|---|
Zeile 20: | Zeile 20: | ||
For historical reasons there are two versions of Python language avilable: Python 2.x and Python 3.x. Unfortunately Python 3.x includes a lot of incvompatible changes to the Python language so that version 2.x has still to be maintained, as a lot of solutions are based on this version | For historical reasons there are two versions of Python language avilable: Python 2.x and Python 3.x. Unfortunately Python 3.x includes a lot of incvompatible changes to the Python language so that version 2.x has still to be maintained, as a lot of solutions are based on this version | ||
VEGASPython is also based on Python 2.x. | VEGASPython is also based on Python 2.x. | ||
+ | |||
+ | PythonNet: Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers. It allows Python code to interact with the CLR, and may also be used to embed Python into a .NET application. | ||
Several different Python implementations are available CPython, JPython etc. The orginal version is called CPython as it is written in the programming language " | Several different Python implementations are available CPython, JPython etc. The orginal version is called CPython as it is written in the programming language " | ||
Zeile 28: | Zeile 30: | ||
If you want to know more about IRONPython you can get more information on the official website [[http:// | If you want to know more about IRONPython you can get more information on the official website [[http:// | ||
The main problem of IRONPython is the incompatibility with several standard Python moduels like openCV and NumPy. Especially openCV is interesting for Video editing. | The main problem of IRONPython is the incompatibility with several standard Python moduels like openCV and NumPy. Especially openCV is interesting for Video editing. | ||
+ | |||
+ | Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers. It allows Python code to interact with the CLR, and may also be used to embed Python into a .NET application. | ||
Zeile 45: | Zeile 49: | ||
You open the window in VEGAS via "View - Extensions - VEGASPython Interactive Window" | You open the window in VEGAS via "View - Extensions - VEGASPython Interactive Window" | ||
- | {{: | + | {{: |
This opens the interactive VEGASPython Window: | This opens the interactive VEGASPython Window: | ||
- | {{: | + | {{: |
The interactive VEGASPython Window consists of two textboxes. | The interactive VEGASPython Window consists of two textboxes. | ||
Zeile 66: | Zeile 70: | ||
Enter: | Enter: | ||
<code python> | <code python> | ||
- | print" | + | print ("Hello World") |
</ | </ | ||
Zeile 79: | Zeile 83: | ||
==== Introduction to the Python Language ==== | ==== Introduction to the Python Language ==== | ||
It is not the intention of this tutorial to provide a complete Python tutorial. I will only show you the items you need to know to be able to create or modify VEGASPython scripts. | It is not the intention of this tutorial to provide a complete Python tutorial. I will only show you the items you need to know to be able to create or modify VEGASPython scripts. | ||
+ | VEGASPython is based on Python 3.x. Therefore the Python 3 syntax has to be used. | ||
=== Functions === | === Functions === | ||
Zeile 115: | Zeile 120: | ||
<code Python> | <code Python> | ||
numberVariable = 5 | numberVariable = 5 | ||
- | print numberVariable | + | print (numberVariable) |
floatVariable = 0.5 | floatVariable = 0.5 | ||
- | print floatVariable | + | print (floatVariable) |
stringVariable = " | stringVariable = " | ||
- | print stringVariable | + | print (stringVariable) |
</ | </ | ||
Zeile 160: | Zeile 165: | ||
<code python> | <code python> | ||
- | print pyVEGAS.Version | + | print (pyVEGAS.Version) |
</ | </ | ||