Python Online Learning Tutorials:
Common keys:
Ctrl+d or Quit () to quit Python
C-a (CONTROL-A) moves the cursor to the beginning of the line, C-E to the end, C-b moves it one position to the left, c-f to the right. Backspace erases the character to the left of the cursor, and c-d the character to their right. C-k kills (erases) the rest of the line to the right of the cursor, c-y Yanks back and the last killed string. C-underscore undoes the last change to you made; C-p moves one line up on the history buffer, C-n moves one down.
IPython, which features tab completion, object exploration and advanced history management. It can also is thoroughly customized and embedded into other applications. Another similar enhanced interactive environment is Bpython.
Python would execute the contents of a file identified by the PYTHONSTARTUP environment variable when you start an interact Ive interpreter.
Mechanism:
When called with standard input connected to a TTY device, it prompts for commands and executes them until an EOF (an end- Of-file character, you can produce this with ctrl-d on UNIX or ctrl-z, Enter on Windows) is read.
When the called with a file name argument or with a file as standard input, it reads and executes a script from the that file.
When called with a directory Name argument, it reads and executes an appropriately named script from the that directory.
When called With-c command, it executes the Python statement (s) given as command. Here command is contain multiple statements separated by newlines. Leading whitespace is significant in Python statements!
When called With-m Module-name, the given module was located on the Python module path and executed as a script.
Note that the hash, or pound, character, ' # ', was used to start a comment in Python.
The last printed expression was assigned to the variable _;don ' t explicitly assign a value to It-you would create an Inde Pendent local variable with the same name masking the built-in variable with its magic behavior. The string is enclosed with double quotes if the string contains a single quote and no double quotes, otherwise it is Enclos Ed in single quotes.
can refer to and learn from the website: https://docs.python.org/2/tutorial/interpreter.html
http://python.org/
This article is from the "Cloud Light Breeze" blog, please be sure to keep this source http://htlbydgod.blog.51cto.com/9829379/1630699
Python tutorials Common keys and mechanisms