Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:pycram:repl [2021/05/07 12:03] – jdech | tutorials:pycram:repl [2023/02/23 12:33] (current) – [Setup IPython as a PyCRAM Repl] jdech | ||
---|---|---|---|
Line 23: | Line 23: | ||
robot = bullet_world.Object(" | robot = bullet_world.Object(" | ||
floor = bullet_world.Object(" | floor = bullet_world.Object(" | ||
- | milk = bullet_world.Object(" | + | milk = bullet_world.Object(" |
world.robot = robot | world.robot = robot | ||
Line 46: | Line 46: | ||
==== Enable autoreload ==== | ==== Enable autoreload ==== | ||
- | To use changes made in the Python file while the Repl is running you need to enable the iPython extension autoreload. This can be done by typing | + | To use changes made in the Python file while the Repl is running you need to enable the iPython extension autoreload. This can be done using the iPython startup files, these are files which are always run if iPython is started. |
- | < | + | The startup files are located |
- | This loads the extension. | + | In this directory create a file called 00-autoreload.ipy and enter the following |
- | < | + | < |
- | This command | + | %load_ext autoreload |
+ | %autoreload 2 | ||
+ | </ | ||
+ | |||
+ | The first line loads the extension to iPython and the second line configures autoreload to reload all modules before the typed in code is executed. | ||
+ | |||
+ | **Tip** | ||
+ | If you use iPython only as a Repl for PyCRAM you can create a symbolic link in the startup directory which links to your setup.py file. | ||