Ipython Documentation Release 0.10.1
Total Page:16
File Type:pdf, Size:1020Kb
IPython Documentation Release 0.10.1 The IPython Development Team October 11, 2010 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.............................. 88 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.1......................................... 109 8.2 Release 0.10.......................................... 111 8.3 Release 0.9.1.......................................... 114 8.4 Release 0.9........................................... 114 8.5 Release 0.8.4.......................................... 119 8.6 Release 0.8.3.......................................... 119 8.7 Release 0.8.2.......................................... 119 8.8 Older releases......................................... 119 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.......................................... 139 10.3 CrashHandler.......................................... 140 10.4 DPyGetOpt........................................... 142 10.5 Debugger............................................ 145 10.6 Itpl............................................... 147 10.7 Logger............................................. 150 10.8 Magic.............................................. 152 10.9 OInspect............................................ 174 10.10 OutputTrap........................................... 176 10.11 Prompts............................................. 179 10.12 PyColorize........................................... 181 10.13 Shell.............................................. 183 10.14 UserConfig.ipy_user_conf................................... 192 10.15 background_jobs........................................ 192 10.16 clipboard............................................ 195 10.17 completer............................................ 196 10.18 config.api............................................ 199 10.19 config.cutils.......................................... 200 10.20 deep_reload........................................... 200 10.21 demo.............................................. 201 10.22 dtutils.............................................. 210 10.23 excolors............................................. 210 ii 10.24 external.Itpl........................................... 211 10.25 external.argparse........................................ 214 10.26 external.configobj....................................... 220 10.27 external.guid.......................................... 232 10.28 external.mglob......................................... 232 10.29 external.path.......................................... 233 10.30 external.pretty......................................... 242 10.31 external.simplegeneric..................................... 247 10.32 external.validate........................................ 247 10.33 frontend.asyncfrontendbase.................................. 262 10.34 frontend.frontendbase..................................... 263 10.35 frontend.linefrontendbase................................... 265 10.36 frontend.prefilterfrontend................................... 267 10.37 frontend.process.pipedprocess................................. 268 10.38 frontend.wx.console_widget.................................. 269 10.39 frontend.wx.ipythonx..................................... 270 10.40 frontend.wx.wx_frontend................................... 271 10.41 generics............................................. 273 10.42 genutils............................................. 273 10.43 gui.wx.ipshell_nonblocking.................................. 289 10.44 gui.wx.ipython_history..................................... 291 10.45 gui.wx.ipython_view...................................... 293 10.46 gui.wx.thread_ex........................................ 297 10.47 history............................................. 297 10.48 hooks.............................................. 299 10.49 ipapi.............................................. 302 10.50 iplib............................................... 309 10.51 ipmaker............................................. 321 10.52 ipstruct............................................. 322 10.53 irunner............................................. 325 10.54 kernel.client.......................................... 329 10.55 kernel.clientconnector..................................... 330 10.56 kernel.clientinterfaces..................................... 331 10.57 kernel.codeutil......................................... 332 10.58 kernel.contexts......................................... 333 10.59 kernel.controllerservice.................................... 334 10.60 kernel.core.display_formatter................................. 336 10.61 kernel.core.display_trap.................................... 337 10.62 kernel.core.error........................................ 338 10.63 kernel.core.fd_redirector.................................... 339 10.64 kernel.core.file_like...................................... 340 10.65 kernel.core.history....................................... 341 10.66 kernel.core.interpreter..................................... 343 10.67 kernel.core.macro....................................... 348 10.68 kernel.core.magic....................................... 348 10.69 kernel.core.message_cache................................... 349 10.70 kernel.core.notification..................................... 351 10.71 kernel.core.output_trap..................................... 352 iii 10.72 kernel.core.prompts...................................... 353 10.73 kernel.core.redirector_output_trap............................... 356 10.74 kernel.core.sync_traceback_trap................................ 357 10.75 kernel.core.traceback_formatter................................ 357 10.76 kernel.core.traceback_trap................................... 358 10.77 kernel.core.util......................................... 359 10.78 kernel.engineconnector..................................... 361 10.79 kernel.enginefc......................................... 362 10.80 kernel.engineservice...................................... 365 10.81 kernel.error........................................... 373 10.82 kernel.fcutil........................................... 379 10.83 kernel.magic.......................................... 379 10.84 kernel.map........................................... 379 10.85 kernel.mapper......................................... 380 10.86 kernel.multiengine....................................... 383 10.87 kernel.multiengineclient.................................... 389 10.88 kernel.multienginefc...................................... 398 10.89 kernel.newserialized...................................... 402 10.90 kernel.parallelfunction..................................... 404 10.91 kernel.pbutil.......................................... 406 10.92 kernel.pendingdeferred..................................... 406 10.93 kernel.pickleutil........................................ 408 10.94 kernel.scripts.ipcluster..................................... 409 10.95 kernel.scripts.ipcontroller................................... 413 10.96 kernel.scripts.ipengine..................................... 414 10.97