IPython

Free and open source interactive interpreter for Python
Download

IPython Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • The IPython Team
  • Publisher web site:
  • http://ipython.scipy.org/moin/About
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 5.6 MB

IPython Tags


IPython Description

Free and open source interactive interpreter for Python IPython is a free software project which tries to provide an interactive shell superior to Python's default. IPython has many features for object introspection, system shell access, and its own special command system for adding functionality when working interactively. IPython tries to be a very efficient environment both for Python code development and for exploration of problems using Python objects (in situations like data analysis).IPython also tries to:· Serve as an embeddable, ready to use interpreter for your own programs. IPython can be started with a single call from inside another program, providing access to the current namespace. This can be very useful both for debugging purposes and for situations where a blend of batch-processing and interactive exploration are needed.· Offer a flexible framework which can be used as the base environment for other systems with Python as the underlying language. Specifically scientific environments like Mathematica, IDL and Mathcad inspired its design, but similar ideas can be useful in many fields.· Allow interactive testing of threaded graphical toolkits.IPython has support for interactive, non-blocking control of WX, Qt, GTK, and applications via special threading flags. The normal Python shell can only do this for Tkinter applications.NOTE: iPython is licensed and distributed under the BSD license. Here are some key features of "IPython": · Dynamic object introspection. One can access docstrings, function definition prototypes, source code, source files and other details of any object accessible to the interpreter with a single keystroke (?, and using ?? provides additional detail). · Searching through modules and namespaces with * wildcards, both when using the ? system and via the %psearch command. · Completion in the local namespace, by typing TAB at the prompt. This works for keywords, modules, methods, variables and files in the current directory. This is supported via the readline library, and full access to configuring readline’s behavior is provided. Custom completers can be implemented easily for different purposes (system commands, magic arguments etc.) · Numbered input/output prompts with command history (persistent across sessions and tied to each profile), full searching in this history and caching of all input and output. · User-extensible ‘magic’ commands. A set of commands prefixed with % is available for controlling IPython itself and provides directory control, namespace information and many aliases to common system shell commands. · Alias facility for defining your own system aliases. · Complete system shell access. Lines starting with ! are passed directly to the system shell, and using !! or var = !cmd captures shell output into python variables for further use. · Background execution of Python commands in a separate thread. IPython has an internal job manager called jobs, and a convenience backgrounding magic function called %bg. · The ability to expand python variables when calling the system shell. In a shell command, any python variable prefixed with $ is expanded. A double $$ allows passing a literal $ to the shell (for access to shell and environment variables like PATH). · Filesystem navigation, via a magic command, along with a persistent bookmark system (using %bookmark) for fast access to frequently visited directories. · A lightweight persistence framework via the %store command, which allows you to save arbitrary Python variables. These get restored automatically when your session restarts. · Automatic indentation (optional) of code as you type (through the readline library). · Macro system for quickly re-executing multiple lines of previous input with a single name. Macros can be stored persistently via %store and edited via it. · Session logging (you can then later use these logs as code in your programs). Logs can optionally timestamp all input, and also store session output (marked as comments, so the log remains valid Python source code). · Session restoring: logs can be replayed to restore a previous session to the state where you left it. · Verbose and colored exception traceback printouts. Easier to parse visually, and in verbose mode they produce a lot of useful debugging information (basically a terminal version of the cgitb module). · Auto-parentheses: callable objects can be executed without parentheses: sin 3 is automatically converted to sin(3). · Auto-quoting: using ,, or ; as the first character forces auto-quoting of the rest of the line: ,my_function a b becomes automatically my_function("a","b"), while ;my_function a b becomes my_function("a b"). · Extensible input syntax. You can define filters that pre-process user input to simplify input in special situations. This allows for example pasting multi-line code fragments which start with >>> or ... such as those from other python sessions or the standard Python documentation. · Flexible configuration system. It uses a configuration file which allows permanent setting of all command-line options, module loading, code and file execution. The system allows recursive file inclusion, so you can have a base file with defaults and layers which load other customizations for particular projects. · Embeddable. You can call IPython as a python shell inside your own python programs. This can be used both for debugging code or for providing interactive abilities to your programs with knowledge about the local namespaces (very useful in debugging and data analysis situations). · Easy debugger access. You can set IPython to call up an enhanced version of the Python debugger (pdb) every time there is an uncaught exception. This drops you inside the code which triggered the exception with all the data live and it is possible to navigate the stack to rapidly isolate the source of a bug. The %run magic command (with the -d option) can run any script under pdb’s control, automatically setting initial breakpoints for you. This version of pdb has IPython-specific improvements, including tab-completion and traceback coloring support. For even easier debugger access, try bug after seeing an exception. winpdb is also supported, see ipy_winpdb extension. · Profiler support. You can run single statements (similar to profile.run()) or complete programs under the profiler’s control. While this is possible with standard cProfile or profile modules, IPython wraps this functionality with magic commands (see %prun and %run -p) convenient for rapid interactive work. · Doctest support. The special %doctest_mode command toggles a mode that allows you to paste existing doctests (with leading >>> prompts and whitespace) and uses doctest-compatible prompts and output, so you can use IPython sessions as doctest code. Requirements: · Python What's New in This Release: New features: · New %paste magic automatically extracts current contents of clipboard and pastes it directly, while correctly handling code that is indented or prepended with >>> or ... python prompt markers. A very useful new feature contributed by Robert Kern. · IPython ‘demos’, created with the IPython.demo module, can now be created from files on disk or strings in memory. Other fixes and improvements to the demo system, by Tom Fetherston. · Added find_cmd() function to IPython.platutils module, to find commands in a cross-platform manner. · Many improvements and fixes to Ga?l Varoquaux’s ipythonx, a WX-based lightweight IPython instance that can be easily embedded in other WX applications. These improvements have made it possible to now have an embedded IPython in Mayavi and other tools. · MultiengineClient objects now have a benchmark() method. · The manual now includes a full set of auto-generated API documents from the code sources, using Sphinx and some of our own support code. We are now using the Numpy Documentation Standard for all docstrings, and we have tried to update as many existing ones as possible to this format. · The new IPython.Extensions.ipy_pretty extension by Robert Kern provides configurable pretty-printing. · Many improvements to the ipython-wx standalone WX-based IPython application by Laurent Dufréchou. It can optionally run in a thread, and this can be toggled at runtime (allowing the loading of Matplotlib in a running session without ill effects). · IPython includes a copy of Steven Bethard’s argparse in the IPython.external package, so we can use it internally and it is also available to any IPython user. By installing it in this manner, we ensure zero conflicts with any system-wide installation you may already have while minimizing external dependencies for new users. In IPython 0.10, We ship argparse version 1.0. · An improved and much more robust test suite, that runs groups of tests in separate subprocesses using either Nose or Twisted’s trial runner to ensure proper management of Twisted-using code. The test suite degrades gracefully if optional dependencies are not available, so that the iptest command can be run with only Nose installed and nothing else. We also have more and cleaner test decorators to better select tests depending on runtime conditions, do setup/teardown, etc. · The new ipcluster now has a fully working ssh mode that should work on Linux, Unix and OS X. Thanks to Vishal Vatsa for implementing this! · The wonderful TextMate editor can now be used with it on OS X. Thanks to Matt Foster for this patch. · The documentation regarding parallel uses of IPython, including MPI and PBS, has been significantly updated and improved. · The developer guidelines in the documentation have been updated to explain our workflow using bzr and Launchpad. · Fully refactored ipcluster command line program for starting IPython clusters. This new version is a complete rewrite and 1) is fully cross platform (we now use Twisted’s process management), 2) has much improved performance, 3) uses subcommands for different types of clusters, 4) uses argparse for parsing command line options, 5) has better support for starting clusters using mpirun, 6) has experimental support for starting engines using PBS. It can also reuse FURL files, by appropriately passing options to its subcommands. However, this new version of ipcluster should be considered a technology preview. We plan on changing the API in significant ways before it is final. · Full description of the security model added to the docs. · cd completer: show bookmarks if no other completions are available. · sh profile: easy way to give ‘title’ to prompt: assign to variable ‘_prompt_title’. Bug fixes: · Fix #368719, removed top-level debian/ directory to make the job of Debian packagers easier. · Fix #291143 by including man pages contributed by Stephan Peijnik from the Debian project. · Fix #358202, effectively a race condition, by properly synchronizing file creation at cluster startup time. · %timeit now handles correctly functions that take a long time to execute even the first time, by not repeating them. · Fix #239054, releasing of references after exiting. · Fix #341726, thanks to Alexander Clausen. · Fix #269966. This long-standing and very difficult bug (which is actually a problem in Python itself) meant long-running sessions would inevitably grow in memory size, often with catastrophic consequences if users had large objects in their scripts. Now, using %run repeatedly should not cause any memory leaks. Special thanks to John Hunter and Sameer D’Costa for their help with this bug. · Fix #295371, bug in %history. · Improved support for py2exe. · Fix #270856: IPython hangs with PyGTK · Fix #270998: A magic with no docstring breaks the ‘%magic magic’ · fix #271684: -c startup commands screw up raw vs. native history · Numerous bugs on Windows with the new ipcluster have been fixed. · The ipengine and ipcontroller scripts now handle missing furl files more gracefully by giving better error messages. · %rehashx: Aliases no longer contain dots. python3.0 binary will create alias python30. Fixes: #259716 “commands with dots in them don’t work” · %cpaste: %cpaste -r repeats the last pasted block. The block is assigned to pasted_block even if code raises exception. · Bug #274067 ‘The code in get_home_dir is broken for py2exe’ was fixed. · Many other small bug fixes not listed here by number (see the bzr log for more info). Backwards incompatible changes: · ipykit and related files were unmaintained and have been removed.The IPython.genutils.doctest_reload() does not actually call reload(doctest) anymore, as this was causing many problems with the test suite. It still resets doctest.master to None.While we have not deliberately broken Python 2.4 compatibility, only minor testing was done with Python 2.4, while 2.5 and 2.6 were fully tested. But if you encounter problems with 2.4, please do report them as bugs.The ipcluster now requires a mode argument; for example to start a cluster on the local machine with 4 engines, you must now type: "$ ipcluster local -n 4" · The controller now has a -r flag that needs to be used if you want to reuse existing furl files. Otherwise they are deleted (the default).Remove ipy_leo.py. You can use easy_install ipython-extension to get it. (done to decouple it from ipython release cycle)


IPython Related Software