Ipython Documentation Release 0.10.2
Total Page:16
File Type:pdf, Size:1020Kb
IPython Documentation Release 0.10.2 The IPython Development Team April 09, 2011 CONTENTS 1 Introduction 1 1.1 Overview............................................1 1.2 Enhanced interactive Python shell...............................1 1.3 Interactive parallel computing.................................3 2 Installation 5 2.1 Overview............................................5 2.2 Quickstart...........................................5 2.3 Installing IPython itself....................................6 2.4 Basic optional dependencies..................................7 2.5 Dependencies for IPython.kernel (parallel computing)....................8 2.6 Dependencies for IPython.frontend (the IPython GUI).................... 10 3 Using IPython for interactive work 11 3.1 Quick IPython tutorial..................................... 11 3.2 IPython reference........................................ 17 3.3 IPython as a system shell.................................... 42 3.4 IPython extension API..................................... 47 4 Using IPython for parallel computing 53 4.1 Overview and getting started.................................. 53 4.2 Starting the IPython controller and engines.......................... 57 4.3 IPython’s multiengine interface................................ 64 4.4 The IPython task interface................................... 78 4.5 Using MPI with IPython.................................... 80 4.6 Security details of IPython................................... 83 4.7 IPython/Vision Beam Pattern Demo.............................. 89 5 Configuration and customization 95 5.1 Initial configuration of your environment........................... 95 5.2 Customization of IPython................................... 99 5.3 New configuration system................................... 103 6 Frequently asked questions 105 6.1 General questions....................................... 105 i 6.2 Questions about parallel computing with IPython....................... 105 7 History 107 7.1 Origins............................................. 107 7.2 Today and how we got here.................................. 107 8 What’s new 109 8.1 Release 0.10.2......................................... 109 8.2 Release 0.10.1......................................... 110 8.3 Release 0.10.......................................... 111 8.4 Release 0.9.1.......................................... 115 8.5 Release 0.9........................................... 115 8.6 Release 0.8.4.......................................... 119 8.7 Release 0.8.3.......................................... 119 8.8 Release 0.8.2.......................................... 120 8.9 Older releases......................................... 120 9 IPython Developer’s Guide 121 9.1 IPython development guidelines................................ 121 9.2 Coding guide.......................................... 129 9.3 Documenting IPython..................................... 131 9.4 Development roadmap..................................... 132 9.5 IPython.kernel.core.notification blueprint........................... 134 9.6 Notes on the IPython configuration system.......................... 135 10 The IPython API 137 10.1 ColorANSI........................................... 137 10.2 ConfigLoader.......................................... 141 10.3 CrashHandler.......................................... 142 10.4 DPyGetOpt........................................... 143 10.5 Debugger............................................ 146 10.6 Itpl............................................... 149 10.7 Logger............................................. 152 10.8 Magic.............................................. 154 10.9 OInspect............................................ 176 10.10 OutputTrap........................................... 178 10.11 Prompts............................................. 181 10.12 PyColorize........................................... 183 10.13 Shell.............................................. 185 10.14 UserConfig.ipy_user_conf................................... 194 10.15 background_jobs........................................ 194 10.16 clipboard............................................ 198 10.17 completer............................................ 198 10.18 config.api............................................ 201 10.19 config.cutils.......................................... 202 10.20 deep_reload........................................... 203 10.21 demo.............................................. 203 10.22 dtutils.............................................. 212 ii 10.23 excolors............................................. 213 10.24 external.Itpl........................................... 214 10.25 external.argparse........................................ 217 10.26 external.configobj....................................... 223 10.27 external.guid.......................................... 235 10.28 external.mglob......................................... 235 10.29 external.path.......................................... 236 10.30 external.pretty......................................... 245 10.31 external.simplegeneric..................................... 249 10.32 external.validate........................................ 249 10.33 frontend.asyncfrontendbase.................................. 264 10.34 frontend.frontendbase..................................... 265 10.35 frontend.linefrontendbase................................... 267 10.36 frontend.prefilterfrontend................................... 269 10.37 frontend.process.pipedprocess................................. 270 10.38 frontend.wx.console_widget.................................. 271 10.39 frontend.wx.ipythonx..................................... 273 10.40 frontend.wx.wx_frontend................................... 274 10.41 generics............................................. 275 10.42 genutils............................................. 276 10.43 gui.wx.ipshell_nonblocking.................................. 292 10.44 gui.wx.ipython_history..................................... 294 10.45 gui.wx.ipython_view...................................... 296 10.46 gui.wx.thread_ex........................................ 300 10.47 history............................................. 300 10.48 hooks.............................................. 302 10.49 ipapi.............................................. 304 10.50 iplib............................................... 311 10.51 ipmaker............................................. 324 10.52 ipstruct............................................. 324 10.53 irunner............................................. 328 10.54 kernel.client.......................................... 332 10.55 kernel.clientconnector..................................... 333 10.56 kernel.clientinterfaces..................................... 334 10.57 kernel.codeutil......................................... 335 10.58 kernel.contexts......................................... 336 10.59 kernel.controllerservice.................................... 337 10.60 kernel.core.display_formatter................................. 339 10.61 kernel.core.display_trap.................................... 340 10.62 kernel.core.error........................................ 341 10.63 kernel.core.fd_redirector.................................... 342 10.64 kernel.core.file_like...................................... 343 10.65 kernel.core.history....................................... 344 10.66 kernel.core.interpreter..................................... 346 10.67 kernel.core.macro....................................... 351 10.68 kernel.core.magic....................................... 351 10.69 kernel.core.message_cache................................... 352 10.70 kernel.core.notification..................................... 354 iii 10.71 kernel.core.output_trap..................................... 355 10.72 kernel.core.prompts...................................... 356 10.73 kernel.core.redirector_output_trap............................... 359 10.74 kernel.core.sync_traceback_trap................................ 360 10.75 kernel.core.traceback_formatter................................ 360 10.76 kernel.core.traceback_trap................................... 361 10.77 kernel.core.util......................................... 362 10.78 kernel.engineconnector..................................... 364 10.79 kernel.enginefc......................................... 365 10.80 kernel.engineservice...................................... 369 10.81 kernel.error........................................... 376 10.82 kernel.fcutil........................................... 383 10.83 kernel.magic.......................................... 383 10.84 kernel.map........................................... 383 10.85 kernel.mapper......................................... 384 10.86 kernel.multiengine....................................... 387 10.87 kernel.multiengineclient.................................... 394 10.88 kernel.multienginefc...................................... 402 10.89 kernel.newserialized...................................... 406 10.90 kernel.parallelfunction..................................... 408 10.91 kernel.pbutil.......................................... 410 10.92 kernel.pendingdeferred..................................... 411 10.93 kernel.pickleutil........................................ 412 10.94 kernel.scripts.ipcluster..................................... 413 10.95 kernel.scripts.ipcontroller................................... 418 10.96 kernel.scripts.ipengine....................................