4
The **Console** is where you may enter, interact with and visualize data,
4
The **Console** is where you may enter, interact with and visualize data,
5
5
inside a command interpreter. All the commands entered in the console are
6
6
executed in a separate process, thus allowing the user to interrupt any
9
9
.. image:: images/console.png
11
Many command windows may be created in the **Console**:
14
* IPython interpreter (the external module `IPython` is required)
15
* Running Python script
16
* System command window (this terminal emulation window has quite limited
17
features compared to a real terminal: it may be useful on Windows
18
platforms where the system terminal is not much more powerful - on the
19
contrary, on GNU/Linux, a real system terminal is opened, outside Spyder)
11
Many command windows may be created in the **Console**:
14
* Running Python script
15
* System command window (this terminal emulation window has quite limited
16
features compared to a real terminal: it may be useful on Windows
17
platforms where the system terminal is not much more powerful - on the
18
contrary, on GNU/Linux, a real system terminal is opened, outside Spyder)
21
20
Python-based command windows support the following features:
23
* Code completion and calltips
24
* Variable explorer with GUI-based editors for arrays, lists,
25
dictionaries, strings, etc.
26
* Debugging with standard Python debugger (`pdb`): at each breakpoint
27
the corresponding script is opened in the :doc:`editor` at the breakpoint
29
* User Module Deleter (see below)
22
* Code completion and calltips
23
* Variable explorer with GUI-based editors for arrays, lists,
24
dictionaries, strings, etc.
25
* Debugging with standard Python debugger (`pdb`): at each breakpoint
26
the corresponding script is opened in the :doc:`editor` at the breakpoint
28
* User Module Deleter (see below)
39
39
Reloading modules: the User Module Deleter (UMD)
40
40
------------------------------------------------
42
42
When working with Python scripts interactively, one must keep in mind that
43
43
Python import a module from its source code (on disk) only when parsing the
44
44
first corresponding import statement. During this first import, the byte code
45
45
is generated (.pyc file) if necessary and the imported module code object is
46
46
cached in `sys.modules`. Then, when re-importing the same module, this cached
47
47
code object will be directly used even if the source code file (.py[w] file)
48
has changed meanwhile.
48
has changed meanwhile.
50
50
This behavior is sometimes unexpected when working with the Python interpreter
51
51
in interactive mode, because one must either always restart the interpreter