Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:pycram:repl [2021/05/07 12:03] jdechtutorials:pycram:repl [2023/02/23 12:33] (current) – [Setup IPython as a PyCRAM Repl] jdech
Line 23: Line 23:
 robot = bullet_world.Object("boxy", "robot", "resources/boxy.urdf", [0, 0, 0], [0, 0, 0, 1]) robot = bullet_world.Object("boxy", "robot", "resources/boxy.urdf", [0, 0, 0], [0, 0, 0, 1])
 floor = bullet_world.Object("floor", "environment", "resources/plane.urdf") floor = bullet_world.Object("floor", "environment", "resources/plane.urdf")
-milk = bullet_world.Object("milk", "milk""resources/milk.obj")+milk = bullet_world.Object("milk", "milk""resources/milk.obj")
 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 the following commands in the iPython console.  +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.  
-<code>%load_ext autoreload</code+The startup files are located in ~/.ipython/profile_default/startup along with a README file which explains the usage of the startup files.  
-This loads the extension.  +In this directory create a file called 00-autoreload.ipy and enter the following code to the file
-<code>%autoreload 2</code> +<code> 
-This command configures autoreload to reload all imported modules before the code is executed.+%load_ext autoreload  
 +%autoreload 2 
 +</code> 
 + 
 +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.