Line 1: |
Line 1: |
− | [[File:python-logo-master-v3-TM.png|thumb|300px]]
| + | {{Infobox software |
| + | | name = Software name |
| + | | logo = Python-logo-notext.svg |
| + | | screenshot = python-logo-master-v3-TM.png |
| + | | caption = |
| + | | developer = |
| + | | released = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --> |
| + | | discontinued = |
| + | | latest release version = |
| + | | latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --> |
| + | | latest preview version = |
| + | | latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --> |
| + | | installed version = 2.7 |
| + | | installed version date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --> |
| + | | status = Active |
| + | | programming language = Python |
| + | | operating system = |
| + | | platform = |
| + | | website = [http://www.python.org python.org] |
| + | | resources = |
| + | {{Infobox tsg |
| + | | child = yes |
| + | | downloads = {{bulleted list |
| + | | [http://www.ru.nl Some Download link] |
| + | }} |
| + | | manuals = {{bulleted list |
| + | | [http://www.ru.nl Quick start guide] |
| + | }} |
| + | }} |
| + | }} |
| | | |
− | = Windows Installation =
| + | [[wikipedia:Python_(programming_language)|Python]] is a general-purpose, high-level programming language. |
| | | |
− | === Windows Installation Python 2.7 ===
| + | <!-- Table of Contents will be generated here --> |
| | | |
− | You can download the '''''Win32''''' installer by clicking on the following link:
| + | ==Installation== |
− | https://www.python.org/downloads/
| |
| | | |
− | === Set Windows Environment Variables === | + | ===Windows (32 bit)=== |
− |
| + | # Download the [https://www.python.org/downloads/ Win32 installer] |
− | Computer --> Properties --> Advanced settings --> Environment Variables.
| + | # Double-click on the executable and follow the steps on your screen. |
| + | |
| + | ==Configuration== |
| + | === Windows Environment Variables === |
| + | <pre>Computer --> Properties --> Advanced settings --> Environment Variables.</pre> |
| | | |
− | [[image:python_env.jpg | 400px]] | + | [[image:python_env.jpg]] |
| | | |
| Add the following Path: | | Add the following Path: |
| | | |
− | C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\;
| + | <pre>C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\;</pre> |
| | | |
− | [[image:python_path.jpg | 400px]] | + | [[image:python_path.jpg]] |
| | | |
− | [[image:python_path2.jpg | 400px]] | + | [[image:python_path2.jpg]] |
| | | |
− | === Windows Installation PIP package manager === | + | ===Package Management=== |
| + | After Python is installed, you can use [[wikipedia:Pip_(package_manager)|pip]] to install your required side packages. pip is included with Python 2.7.9. For older versions, use the following steps to install: |
| | | |
− | Install Pip by executing get-pip.py you can get the file here: https://raw.github.com/pypa/pip/master/contrib/get-pip.py*
| + | # Download [https://raw.github.com/pypa/pip/master/contrib/get-pip.py get-pip.py] |
| + | # Execute get-pip by entering the following command: <code style="background-color:#000; color:#fff; padding:1px 3px;">python get-pip.py</code> |
| | | |
− | Execute the following command:
| + | To install a side package, simply execute the following command: <code style="background-color:#000; color:#fff; padding:1px 3px;">c:\pip install PACKAGE_NAME</code><br/> |
| + | Replace PACKAGE_NAME with the name of the package of choice. |
| | | |
− | <code style="background-color:#000; color:#fff; padding:1px 3px;">python get-pip.py</code>
| + | '''Note:''' By default, side packages are installed in the following folder (Windows): |
| + | <pre>C:\Python27\Lib\site-packages</pre> |
| + | This location may differ if you have installed Python somewhere else. |
| | | |
− | *PIP is '''included''' by default within '''python 2.7.9'''
| + | |
| + | ===List of Side Packages=== |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! scope="col" | Python Library | + | ! Python Library |
− | ! scope="col" | Description | + | ! Description |
− | ! scope="col" | Installed | + | ! Installed |
− | ! scope="col" | Installer Type | + | ! Installer Type |
− | ! scope="col" | URL | + | ! URL |
| | | |
| |- | | |- |
Line 80: |
Line 118: |
| |} | | |} |
| | | |
− | '''Install Psychopy'''
| |
− |
| |
− | '''Example'''
| |
− |
| |
− | <code style="background-color:#000; color:#fff; padding:1px 3px;">c:\pip install psychopy</code>
| |
− |
| |
− | '''Default Folder Location packages'''
| |
| | | |
− | The librarys is installed on the following windows path:
| + | === Setup-Tools === |
− | C:\Python27\Lib\site-packages
| + | To install setup-tools, execute the following command in CMD: <code style="background-color:#000; color:#fff; padding:1px 3px;">pip install -U setuptools</code> |
| | | |
− | === Windows Installation Setup-Tools (easy_install) ===
| |
− |
| |
− | Execute the command within CMD:
| |
− |
| |
− | <code style="background-color:#000; color:#fff; padding:1px 3px;">pip install -U setuptools</code>
| |
| | | |
| === Windows Handlers === | | === Windows Handlers === |
− |
| |
| Check the Handlers by opening the Windows registry editor. | | Check the Handlers by opening the Windows registry editor. |
− |
| |
| <syntaxhighlight lang="reg" overflow:auto;"> | | <syntaxhighlight lang="reg" overflow:auto;"> |
| | | |
Line 120: |
Line 144: |
| | | |
| </syntaxhighlight> | | </syntaxhighlight> |
| + | |
| | | |
| === Python DLL Files === | | === Python DLL Files === |
Line 128: |
Line 153: |
| * '''C:\Windows\SysWOW64''' | | * '''C:\Windows\SysWOW64''' |
| | | |
− | === Execute Python TestArgs.py === | + | == Usage == |
| | | |
− | | + | ===Example: TestArgs.py=== |
− | Execute the following script within the commandline: | + | Execute the following script within the commandline (CMD): <code style="background-color:#000; color:#fff; padding:1px 3px;">python testArgs.py a.</code> |
− | | + | You should see the following result: |
− | <code style="background-color:#000; color:#fff; padding:1px 3px;">python testArgs.py a.</code> | |
− | | |
− | | |
− | You will see the following result: | |
| | | |
| <syntaxhighlight lang="matlab" overflow:auto;"> | | <syntaxhighlight lang="matlab" overflow:auto;"> |
Line 143: |
Line 164: |
| argv[1]: a | | argv[1]: a |
| </syntaxhighlight> | | </syntaxhighlight> |
| + | |
| + | |
| + | ==See Also== <!-- Optional --> |
| + | *[[Psychopy]] |
| + | |
| + | <!-- |
| + | ==References== |
| + | <references /> |
| + | --> |
| + | |
| + | ==External Links== |
| + | *{{Official website|http://www.python.org}} |