Permalink
Browse files

Merge branch 'master' into htmlnotebook

Conflicts:
	setupbase.py
  • Loading branch information...
ellisonbg committed Aug 10, 2011
2 parents ddb901b + 8de5e11 commit fd892df5cf2ce725fc5d7f8195dd459d0bbd0640
Showing with 3,051 additions and 1,410 deletions.
  1. +3 −4 IPython/__init__.py
  2. +15 −5 IPython/config/application.py
  3. +3 −2 IPython/core/crashhandler.py
  4. +4 −1 IPython/core/formatters.py
  5. +7 −5 IPython/core/history.py
  6. +0 −14 IPython/core/magic.py
  7. +14 −12 IPython/core/release.py
  8. +10 −2 IPython/core/tests/test_interactiveshell.py
  9. +5 −2 IPython/core/usage.py
  10. +0 −290 IPython/deathrow/Itpl.py
  11. +4 −2 IPython/frontend/qt/console/console_widget.py
  12. +18 −10 IPython/frontend/qt/console/history_console_widget.py
  13. +5 −1 IPython/frontend/qt/console/ipython_widget.py
  14. +17 −4 IPython/frontend/terminal/ipapp.py
  15. 0 IPython/lib/guisupport.py
  16. +39 −33 IPython/lib/inputhook.py
  17. +7 −5 IPython/lib/irunner.py
  18. +4 −25 IPython/parallel/apps/baseapp.py
  19. +1 −1 IPython/parallel/apps/ipclusterapp.py
  20. +5 −1 IPython/parallel/client/client.py
  21. +10 −1 IPython/parallel/tests/test_client.py
  22. +3 −1 IPython/parallel/util.py
  23. +2 −2 IPython/utils/io.py
  24. +8 −4 IPython/zmq/heartbeat.py
  25. +3 −0 IPython/zmq/iostream.py
  26. +11 −4 IPython/zmq/kernelmanager.py
  27. +13 −2 IPython/zmq/zmqshell.py
  28. +11 −11 README.rst
  29. +9 −6 docs/Makefile
  30. +0 −143 docs/examples/core/ipy.vim
  31. +15 −0 docs/examples/core/ipython-qtconsole.desktop
  32. +1 −8 docs/examples/core/ipython-sh.desktop
  33. +0 −7 docs/examples/core/ipython.desktop
  34. +40 −0 docs/examples/lib/example-demo.py
  35. +0 −4 docs/examples/lib/gui-gtk.py
  36. +0 −54 docs/examples/lib/gui-mpl.py
  37. +2 −1 docs/examples/lib/gui-qt.py
  38. +1 −1 docs/examples/lib/gui-tk.py
  39. +21 −9 docs/examples/lib/gui-wx.py
  40. +65 −0 docs/examples/lib/internal_ipkernel.py
  41. +75 −0 docs/examples/lib/ipkernel_qtapp.py
  42. +119 −0 docs/examples/lib/ipkernel_wxapp.py
  43. +107 −0 docs/examples/vim/README.rst
  44. +343 −0 docs/examples/vim/ipy.vim
  45. +3 −1 docs/man/ipcluster.1
  46. +5 −3 docs/man/ipcontroller.1
  47. +98 −0 docs/man/iplogger.1
  48. +2 −2 docs/man/ipython.1
  49. +3 −1 docs/man/irunner.1
  50. BIN docs/source/_static/logo.png
  51. BIN docs/source/_static/ms_visual_studio.png
  52. BIN docs/source/_static/qtconsole.png
  53. +4 −3 docs/source/about/credits.txt
  54. +1 −1 docs/source/attic/parallel_task_old.txt
  55. BIN docs/source/development/{ → figs}/frontend-kernel.png
  56. 0 docs/source/development/{ → figs}/frontend-kernel.svg
  57. +1 −1 docs/source/development/messaging.txt
  58. +173 −103 docs/source/interactive/qtconsole.txt
  59. +152 −227 docs/source/interactive/reference.txt
  60. +11 −1 docs/source/parallel/parallel_intro.txt
  61. +1 −1 docs/source/parallel/parallel_multiengine.txt
  62. +1 −1 docs/source/parallel/parallel_task.txt
  63. +528 −0 docs/source/whatsnew/github-stats-0.11.txt
  64. +1 −0 docs/source/whatsnew/index.txt
  65. +506 −132 docs/source/whatsnew/version0.11.txt
  66. +338 −160 docs/sphinxext/ipython_directive.py
  67. +4 −5 scripts/ipython_win_post_install.py
  68. +12 −7 setup.py
  69. +15 −54 setupbase.py
  70. +4 −4 tools/build_release
  71. +109 −0 tools/github_stats.py
  72. +31 −20 tools/release
  73. +20 −5 tools/testupload
  74. +8 −1 tools/toollib.py
View
@@ -1,11 +1,11 @@
# encoding: utf-8
"""
-IPython.
+IPython: tools for interactive and parallel computing in Python.
-IPython is a set of tools for interactive and exploratory computing in Python.
+http://ipython.org
"""
#-----------------------------------------------------------------------------
-# Copyright (c) 2008-2010, IPython Development Team.
+# Copyright (c) 2008-2011, IPython Development Team.
# Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
# Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
# Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
@@ -31,7 +31,6 @@
if sys.version[0:3] < '2.6':
raise ImportError('Python Version 2.6 or above is required for IPython.')
-
# Make it easy to import extensions - they are always directly on pythonpath.
# Therefore, non-IPython modules can be added to extensions directory.
# This should probably be in ipapp.py.
@@ -143,9 +143,10 @@ def _flags_changed(self, name, old, new):
def __init__(self, **kwargs):
SingletonConfigurable.__init__(self, **kwargs)
- # Add my class to self.classes so my attributes appear in command line
- # options.
- self.classes.insert(0, self.__class__)
+ # Ensure my class is in self.classes, so my attributes appear in command line
+ # options and config files.
+ if self.__class__ not in self.classes:
+ self.classes.insert(0, self.__class__)
self.init_logging()
@@ -366,8 +367,17 @@ def parse_command_line(self, argv=None):
def load_config_file(self, filename, path=None):
"""Load a .py based config file by filename and path."""
loader = PyFileConfigLoader(filename, path=path)
- config = loader.load_config()
- self.update_config(config)
+ try:
+ config = loader.load_config()
+ except IOError:
+ # problem with the file (probably doesn't exist), raise
+ raise
+ except Exception:
+ # problem while running the file
+ self.log.error("Exception while loading config file %s [path=%s]"%
+ (filename, path), exc_info=True)
+ else:
+ self.update_config(config)
def generate_config_file(self):
"""generate default config file from Configurables"""
@@ -37,14 +37,14 @@
A crash report was automatically generated with the following information:
- A verbatim copy of the crash traceback.
- A copy of your input history during this session.
- - Data on your current $self.app_name configuration.
+ - Data on your current {app_name} configuration.
It was left in the file named:
\t'{crash_report_fname}'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.
-You can mail it to: $self.contact_name at {contact_email}
+You can mail it to: {contact_name} at {contact_email}
with the subject '{app_name} Crash Report'.
If you want to do it now, the following command will work (under Unix):
@@ -126,6 +126,7 @@ def __call__(self, etype, evalue, etb):
# write the report filename into the instance dict so it can get
# properly expanded out in the user message template
self.crash_report_fname = report_name
+ self.info['crash_report_fname'] = report_name
TBhandler = ultratb.VerboseTB(
color_scheme=color_scheme,
long_header=1,
@@ -432,8 +432,11 @@ def __call__(self, obj):
else:
# This uses use StringIO, as cStringIO doesn't handle unicode.
stream = StringIO()
+ # self.newline.encode() is a quick fix for issue gh-597. We need to
+ # ensure that stream does not get a mix of unicode and bytestrings,
+ # or it will cause trouble.
printer = pretty.RepresentationPrinter(stream, self.verbose,
- self.max_width, self.newline,
+ self.max_width, self.newline.encode(),
singleton_pprinters=self.singleton_printers,
type_pprinters=self.type_printers,
deferred_pprinters=self.deferred_printers)
View
@@ -650,6 +650,7 @@ def _format_lineno(session, line):
if 'g' in opts: # Glob search
pattern = "*" + args + "*" if args else "*"
hist = history_manager.search(pattern, raw=raw, output=get_output)
+ print_nums = True
elif 'l' in opts: # Get 'tail'
try:
n = int(args)
@@ -692,9 +693,10 @@ def _format_lineno(session, line):
def magic_rep(self, arg):
- r""" Repeat a command, or get command to input line for editing
+ r"""Repeat a command, or get command to input line for editing. %recall and
+ %rep are equivalent.
- - %rep (no arguments):
+ - %recall (no arguments):
Place a string version of last computation result (stored in the special '_'
variable) to the next input prompt. Allows you to create elaborate command
@@ -706,17 +708,17 @@ def magic_rep(self, arg):
In[3]: %rep
In[4]: heivaan_ <== cursor blinking
- %rep 45
+ %recall 45
Place history line 45 on the next input prompt. Use %hist to find
out the number.
- %rep 1-4
+ %recall 1-4
Combine the specified lines into one cell, and place it on the next
input prompt. See %history for the slice syntax.
- %rep foo+bar
+ %recall foo+bar
If foo+bar can be evaluated in the user namespace, the result is
placed at the next input prompt. Otherwise, the history is searched
View
@@ -385,20 +385,6 @@ def magic_magic(self, parameter_s = ''):
Example: typing '%cd mydir' (without the quotes) changes you working directory
to 'mydir', if it exists.
-You can define your own magic functions to extend the system. See the supplied
-ipythonrc and example-magic.py files for details (in your ipython
-configuration directory, typically $HOME/.config/ipython on Linux or $HOME/.ipython elsewhere).
-
-You can also define your own aliased names for magic functions. In your
-ipythonrc file, placing a line like:
-
- execute __IPYTHON__.magic_pf = __IPYTHON__.magic_profile
-
-will define %pf as a new name for %profile.
-
-You can also call magics in code using the magic() function, which IPython
-automatically adds to the builtin namespace. Type 'magic?' for details.
-
For a list of the available magic functions, use %lsmagic. For a description
of any of them, type %magic_name?, e.g. '%cd?'.
View
@@ -2,7 +2,7 @@
"""Release data for the IPython project."""
#-----------------------------------------------------------------------------
-# Copyright (c) 2008-2010, IPython Development Team.
+# Copyright (c) 2008-2011, IPython Development Team.
# Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
# Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
# Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
@@ -20,7 +20,7 @@
# release. 'dev' as a _version_extra string means this is a development
# version
_version_major = 0
-_version_minor = 11
+_version_minor = 12
_version_micro = '' # use '' for first of series, number for 1 and above
_version_extra = 'dev'
#_version_extra = '' # Uncomment this for full releases
@@ -36,19 +36,19 @@
version = __version__ # backwards compatibility name
-description = "An interactive computing environment for Python"
+description = "IPython: Productive Interactive Computing"
long_description = \
"""
-The goal of IPython is to create a comprehensive environment for
-interactive and exploratory computing. To support this goal, IPython
-has two main components:
+IPython provides a rich toolkit to help you make the most out of using Python
+interactively. Its main components are:
-* An enhanced interactive Python shell.
+* Powerful interactive Python shells (terminal- and Qt-based).
+* Support for interactive data visualization and use of GUI toolkits.
+* Flexible, embeddable interpreters to load into your own projects.
+* Tools for high level and interactive parallel computing.
-* An architecture for interactive parallel computing.
-
-The enhanced interactive Python shell has the following main features:
+The enhanced interactive Python shells have the following main features:
* Comprehensive object introspection.
@@ -116,8 +116,10 @@
url = 'http://ipython.org'
-download_url = 'http://ipython.scipy.org/dist'
+# This will only be valid for actual releases sent to PyPI, but that's OK since
+# those are the ones we want pip/easy_install to be able to find.
+download_url = 'http://archive.ipython.org/release/%s' % version
-platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME']
+platforms = ['Linux','Mac OSX','Windows XP/2000/NT']
keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed']
@@ -112,5 +112,13 @@ def test_trailing_newline(self):
ip = get_ipython()
ip.run_cell('!(true)\n', False)
ip.run_cell('!(true)\n\n\n', False)
-
-
+
+ def test_gh_597(self):
+ """Pretty-printing lists of objects with non-ascii reprs may cause
+ problems."""
+ class Spam(object):
+ def __repr__(self):
+ return "\xe9"*50
+ import IPython.core.formatters
+ f = IPython.core.formatters.PlainTextFormatter()
+ f([Spam(),Spam()])
View
@@ -26,7 +26,6 @@
Usage
------
ipython [subcommand] [options] [files]
@@ -388,8 +387,12 @@
The keybindings themselves are:
- ``Enter``: insert new line (may cause execution, see above).
-- ``C-Enter``: force new line, *never* causes execution.
+- ``C-Enter``: *force* new line, *never* causes execution.
- ``S-Enter``: *force* execution regardless of where cursor is, no newline added.
+- ``Up``: step backwards through the history.
+- ``Down``: step forwards through the history.
+- ``S-Up``: search backwards through the history (like ``C-r`` in bash).
+- ``S-Down``: search forwards through the history.
- ``C-c``: copy highlighted text to clipboard (prompts are automatically stripped).
- ``C-S-c``: copy highlighted text to clipboard (prompts are not stripped).
- ``C-v``: paste text from clipboard.
Oops, something went wrong.

0 comments on commit fd892df

Please sign in to comment.