other:python:starting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
other:python:starting [2019/04/26 11:57] – Improved the quick start section jypeter | other:python:starting [2019/04/26 14:18] – Removed sections that were moved to the quick-start jypeter | ||
---|---|---|---|
Line 268: | Line 268: | ||
Note: Anaconda provides and uses '' | Note: Anaconda provides and uses '' | ||
- | ===== Launching Python | + | ===== ipython |
- | + | ||
- | Once you have initialized the [[# | + | |
- | + | ||
- | Remember that on Linux/Mac you can check which python you are using by typing '' | + | |
- | + | ||
- | ==== Useful keyboard shortcuts ==== | + | |
- | + | ||
- | ^ Key ^ Effect | + | |
- | | **CTRL-D** | + | |
- | | **↑ and ↓** | Go to previous/ | + | |
- | | **CTRL-A** | + | |
- | | **CTRL-E** | + | |
- | | **CTRL-K** | + | |
- | | **CTRL-U** | + | |
- | | **TAB** x 2 | Do some TAB-completion (context dependent)\\ e.g. '' | + | |
- | | **CTRL-C** | + | |
- | | **CTRL-Z** | + | |
- | + | ||
- | ==== Stand-alone script ==== | + | |
- | + | ||
- | A python script is just like any other shell script. You don't have to explicitly call the python interpreter, | + | |
- | + | ||
- | < | + | |
- | jypeter@asterix1 - ...jypeter - 54 >cat basic_script.py | + | |
- | # | + | |
- | + | ||
- | import sys | + | |
- | + | ||
- | script_name = sys.argv[0] | + | |
- | + | ||
- | print(' | + | |
- | + | ||
- | # The end | + | |
- | + | ||
- | jypeter@asterix1 - ...jypeter - 55 >chmod +x basic_script.py | + | |
- | + | ||
- | ypeter@asterix1 - ...jypeter - 56 ># Type here what is required to initialize the distribution you want | + | |
- | + | ||
- | jypeter@asterix1 - ...jypeter - 57 > | + | |
- | Hello world, I am the ./ | + | |
- | </ | + | |
- | + | ||
- | ==== Standard interpreter ==== | + | |
- | + | ||
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | Type '' | + | |
==== ipython interpreter ==== | ==== ipython interpreter ==== |
other/python/starting.txt · Last modified: 2024/09/13 16:20 by jypeter