Permalink
Browse files

remove all trailling spaces

  • Loading branch information...
1 parent fcafc40 commit 34c104381bc2f5e59399b0e260a988ec691d4d48 @bernardofire bernardofire committed Oct 4, 2011
Showing with 4,001 additions and 4,002 deletions.
  1. +39 −39 IPython/config/application.py
  2. +26 −26 IPython/config/configurable.py
  3. +40 −40 IPython/config/loader.py
  4. +13 −13 IPython/core/alias.py
  5. +20 −20 IPython/core/application.py
  6. +33 −33 IPython/core/completer.py
  7. +16 −16 IPython/core/completerlib.py
  8. +6 −6 IPython/core/crashhandler.py
  9. +21 −21 IPython/core/debugger.py
  10. +2 −2 IPython/core/display.py
  11. +7 −7 IPython/core/displayhook.py
  12. +2 −2 IPython/core/displaypub.py
  13. +3 −3 IPython/core/error.py
  14. +4 −4 IPython/core/excolors.py
  15. +2 −2 IPython/core/extensions.py
  16. +10 −10 IPython/core/formatters.py
  17. +93 −93 IPython/core/history.py
  18. +28 −28 IPython/core/hooks.py
  19. +109 −109 IPython/core/interactiveshell.py
  20. +9 −9 IPython/core/logger.py
  21. +214 −214 IPython/core/magic.py
  22. +33 −33 IPython/core/oinspect.py
  23. +14 −14 IPython/core/prefilter.py
  24. +13 −13 IPython/core/profileapp.py
  25. +6 −6 IPython/core/prompts.py
  26. +3 −3 IPython/core/release.py
  27. +11 −11 IPython/core/splitinput.py
  28. +10 −10 IPython/core/tests/test_handlers.py
  29. +11 −11 IPython/core/tests/test_history.py
  30. +27 −27 IPython/core/tests/test_inputsplitter.py
  31. +7 −7 IPython/core/tests/test_oinspect.py
  32. +6 −6 IPython/core/tests/test_run.py
  33. +41 −41 IPython/core/ultratb.py
  34. +14 −14 IPython/core/usage.py
  35. +22 −22 IPython/deathrow/Gnuplot2.py
  36. +34 −34 IPython/deathrow/gui/wx/ipshell_nonblocking.py
  37. +22 −22 IPython/deathrow/gui/wx/ipython_history.py
  38. +76 −76 IPython/deathrow/gui/wx/ipython_view.py
  39. +11 −11 IPython/deathrow/gui/wx/thread_ex.py
  40. +40 −40 IPython/deathrow/gui/wx/wxIPython.py
  41. +63 −63 IPython/deathrow/ipy_constants.py
  42. +5 −5 IPython/deathrow/ipy_defaults.py
  43. +34 −34 IPython/deathrow/ipy_profile_sh.py
  44. +3 −3 IPython/deathrow/ipy_profile_zope.py
  45. +4 −4 IPython/deathrow/ipy_vimserver.py
  46. +10 −10 IPython/deathrow/numutils.py
  47. +12 −12 IPython/deathrow/oldfrontend/asyncfrontendbase.py
  48. +137 −137 IPython/deathrow/oldfrontend/cocoa/cocoa_frontend.py
  49. +1 −1 IPython/deathrow/oldfrontend/cocoa/plugin/setup.py
  50. +10 −10 IPython/deathrow/oldfrontend/cocoa/tests/test_cocoa_frontend.py
  51. +99 −99 IPython/deathrow/oldfrontend/frontendbase.py
  52. +24 −24 IPython/deathrow/oldfrontend/linefrontendbase.py
  53. +16 −16 IPython/deathrow/oldfrontend/prefilterfrontend.py
  54. +6 −6 IPython/deathrow/oldfrontend/process/killableprocess.py
  55. +5 −5 IPython/deathrow/oldfrontend/process/pipedprocess.py
  56. +24 −24 IPython/deathrow/oldfrontend/tests/test_asyncfrontendbase.py
  57. +2 −2 IPython/deathrow/oldfrontend/tests/test_frontendbase.py
  58. +1 −1 IPython/deathrow/oldfrontend/tests/test_linefrontend.py
  59. +5 −5 IPython/deathrow/oldfrontend/tests/test_prefilterfrontend.py
  60. +3 −3 IPython/deathrow/oldfrontend/tests/test_process.py
  61. +47 −47 IPython/deathrow/oldfrontend/wx/console_widget.py
  62. +5 −5 IPython/deathrow/oldfrontend/wx/ipythonx.py
  63. +34 −34 IPython/deathrow/oldfrontend/wx/wx_frontend.py
  64. +1 −1 IPython/deathrow/oldfrontend/zopeinterface.py
  65. +25 −25 IPython/deathrow/tests/test_prefilter.py
  66. +26 −26 IPython/deathrow/twshell.py
  67. +20 −20 IPython/extensions/parallelmagic.py
  68. +11 −11 IPython/external/Itpl/_Itpl.py
  69. +11 −11 IPython/external/decorator/_decorator.py
  70. +3 −3 IPython/external/decorators/_decorators.py
  71. +28 −28 IPython/external/guid/_guid.py
  72. +38 −38 IPython/external/mglob/_mglob.py
  73. +10 −10 IPython/external/pyparsing/_pyparsing.py
  74. +2 −2 IPython/external/qt.py
  75. +31 −31 IPython/external/ssh/tunnel.py
  76. +9 −9 IPython/frontend/html/notebook/handlers.py
  77. +5 −5 IPython/frontend/qt/base_frontend_mixin.py
  78. +8 −8 IPython/frontend/qt/console/ansi_code_processor.py
  79. +2 −2 IPython/frontend/qt/console/bracket_matcher.py
  80. +4 −4 IPython/frontend/qt/console/call_tip_widget.py
  81. +3 −3 IPython/frontend/qt/console/completion_lexer.py
  82. +6 −6 IPython/frontend/qt/console/completion_widget.py
  83. +43 −43 IPython/frontend/qt/console/console_widget.py
  84. +10 −10 IPython/frontend/qt/console/frontend_widget.py
  85. +10 −10 IPython/frontend/qt/console/history_console_widget.py
  86. +11 −11 IPython/frontend/qt/console/ipython_widget.py
  87. +6 −6 IPython/frontend/qt/console/kill_ring.py
  88. +2 −2 IPython/frontend/qt/console/pygments_highlighter.py
  89. +2 −2 IPython/frontend/qt/console/rich_ipython_widget.py
  90. +8 −8 IPython/frontend/qt/kernelmanager.py
  91. +4 −4 IPython/frontend/qt/rich_text.py
  92. +3 −3 IPython/frontend/terminal/embed.py
  93. +37 −37 IPython/frontend/terminal/interactiveshell.py
  94. +5 −5 IPython/frontend/terminal/ipapp.py
  95. +3 −3 IPython/lib/clipboard.py
  96. +11 −11 IPython/lib/deepreload.py
  97. +23 −23 IPython/lib/demo.py
  98. +11 −11 IPython/lib/display.py
  99. +3 −3 IPython/lib/guisupport.py
  100. +6 −6 IPython/lib/inputhookglut.py
  101. +2 −2 IPython/lib/inputhookpyglet.py
  102. +9 −9 IPython/lib/inputhookwx.py
  103. +15 −15 IPython/lib/irunner.py
  104. +2 −2 IPython/lib/tests/test_irunner_pylab_magic.py
  105. +3 −3 IPython/nbformat/v2/__init__.py
  106. +2 −2 IPython/nbformat/v2/nbbase.py
  107. +1 −1 IPython/nbformat/v2/nbpy.py
  108. +31 −31 IPython/parallel/apps/ipclusterapp.py
  109. +50 −50 IPython/parallel/apps/launcher.py
  110. +3 −3 IPython/parallel/apps/winhpcjob.py
  111. +42 −42 IPython/parallel/client/asyncresult.py
  112. +198 −198 IPython/parallel/client/client.py
  113. +28 −28 IPython/parallel/client/remotefunction.py
  114. +194 −194 IPython/parallel/client/view.py
  115. +21 −21 IPython/parallel/controller/dictdb.py
  116. +23 −23 IPython/parallel/controller/heartmonitor.py
  117. +132 −132 IPython/parallel/controller/hub.py
  118. +79 −79 IPython/parallel/controller/scheduler.py
  119. +31 −31 IPython/parallel/controller/sqlitedb.py
  120. +33 −33 IPython/parallel/engine/engine.py
  121. +63 −63 IPython/parallel/engine/streamkernel.py
  122. +11 −11 IPython/parallel/error.py
  123. +5 −5 IPython/quarantine/InterpreterExec.py
  124. +8 −8 IPython/quarantine/clearcmd.py
  125. +18 −18 IPython/quarantine/envpersist.py
  126. +5 −5 IPython/quarantine/ext_rescapture.py
  127. +3 −3 IPython/quarantine/ipy_completers.py
  128. +5 −5 IPython/quarantine/ipy_extutil.py
  129. +38 −38 IPython/quarantine/ipy_fsops.py
  130. +40 −40 IPython/quarantine/ipy_jot.py
  131. +6 −6 IPython/quarantine/ipy_lookfor.py
  132. +18 −18 IPython/quarantine/ipy_rehashdir.py
  133. +10 −10 IPython/quarantine/ipy_render.py
  134. +1 −1 IPython/quarantine/ipy_server.py
  135. +15 −16 IPython/quarantine/ipy_signals.py
  136. +2 −2 IPython/quarantine/ipy_system_conf.py
  137. +15 −15 IPython/quarantine/ipy_winpdb.py
  138. +5 −5 IPython/quarantine/ipy_workdir.py
  139. +20 −20 IPython/quarantine/jobctrl.py
  140. +10 −10 IPython/quarantine/ledit.py
  141. +25 −25 IPython/quarantine/pspersistence.py
  142. +6 −6 IPython/quarantine/win32clip.py
  143. +12 −12 IPython/testing/decorators.py
  144. +17 −17 IPython/testing/globalipapp.py
  145. +23 −23 IPython/testing/iptest.py
  146. +6 −6 IPython/testing/mkdoctests.py
  147. +14 −14 IPython/testing/plugin/ipdoctest.py
  148. +7 −7 IPython/testing/tests/test_ipunittest.py
  149. +11 −11 IPython/testing/tools.py
  150. +5 −5 IPython/utils/autoattr.py
  151. +2 −2 IPython/utils/codeutil.py
  152. +11 −11 IPython/utils/coloransi.py
  153. +1 −1 IPython/utils/generics.py
  154. +1 −1 IPython/utils/growl.py
  155. +8 −8 IPython/utils/io.py
  156. +25 −25 IPython/utils/ipstruct.py
  157. +1 −1 IPython/utils/localinterfaces.py
  158. +8 −8 IPython/utils/notification.py
  159. +27 −27 IPython/utils/path.py
  160. +65 −65 IPython/utils/pickleshare.py
  161. +10 −10 IPython/utils/pickleutil.py
  162. +4 −4 IPython/utils/process.py
  163. +7 −7 IPython/utils/strdispatch.py
  164. +10 −10 IPython/utils/tests/test_notification.py
  165. +16 −16 IPython/utils/tests/test_path.py
  166. +13 −13 IPython/utils/tests/test_traitlets.py
  167. +31 −31 IPython/utils/text.py
  168. +36 −36 IPython/utils/traitlets.py
  169. +6 −6 IPython/utils/wildcard.py
  170. +6 −6 IPython/zmq/entry_point.py
  171. +7 −7 IPython/zmq/frontend.py
  172. +19 −19 IPython/zmq/ipkernel.py
  173. +23 −23 IPython/zmq/kernelmanager.py
  174. +6 −6 IPython/zmq/parentpoller.py
  175. +4 −4 IPython/zmq/pykernel.py
  176. +63 −63 IPython/zmq/session.py
  177. +17 −17 IPython/zmq/tests/test_session.py
  178. +17 −17 IPython/zmq/zmqshell.py
  179. +2 −2 docs/examples/lib/gui-wx.py
  180. +9 −9 docs/examples/newparallel/fetchparse.py
  181. +1 −1 docs/examples/newparallel/multiengine1.py
  182. +2 −2 docs/examples/newparallel/options/mcpricer.py
  183. +2 −2 docs/examples/newparallel/pi/parallelpi.py
  184. +4 −4 docs/examples/newparallel/pi/pidigits.py
  185. +3 −3 docs/examples/newparallel/plotting/plotting_backend.py
  186. +2 −2 docs/examples/newparallel/rmt/rmt.py
  187. +8 −8 docs/examples/newparallel/task_profiler.py
  188. +22 −22 docs/examples/newparallel/wave2D/parallelwave-mpi.py
  189. +21 −21 docs/examples/newparallel/wave2D/parallelwave.py
  190. +9 −9 docs/examples/newparallel/wave2D/wavesolver.py
  191. +20 −20 docs/examples/notebooks/text_analysis.py
  192. +1 −1 docs/source/conf.py
  193. +9 −9 docs/sphinxext/apigen.py
  194. +2 −2 docs/sphinxext/ipython_console_highlighting.py
  195. +10 −10 setup2.py
  196. +15 −15 setupbase.py
  197. +2 −2 setupext/setupext.py
  198. +1 −1 tools/run_ipy_in_profiler.py
@@ -109,10 +109,10 @@ def _log_level_changed(self, name, old, new):
new = getattr(logging, new)
self.log_level = new
self.log.setLevel(new)
-
+
# the alias map for configurables
aliases = Dict({'log-level' : 'Application.log_level'})
-
+
# flags for loading Configurables or store_const style flags
# flags are loaded from this dict by '--key' flags
# this must be a dict of two-tuples, the first element being the Config/dict
@@ -124,28 +124,28 @@ def _flags_changed(self, name, old, new):
assert len(value) == 2, "Bad flag: %r:%s"%(key,value)
assert isinstance(value[0], (dict, Config)), "Bad flag: %r:%s"%(key,value)
assert isinstance(value[1], basestring), "Bad flag: %r:%s"%(key,value)
-
-
+
+
# subcommands for launching other applications
# if this is not empty, this will be a parent Application
- # this must be a dict of two-tuples,
+ # this must be a dict of two-tuples,
# the first element being the application class/import string
# and the second being the help string for the subcommand
subcommands = Dict()
# parse_command_line will initialize a subapp, if requested
subapp = Instance('IPython.config.application.Application', allow_none=True)
-
+
# extra command-line arguments that don't set config values
extra_args = List(Unicode)
-
+
def __init__(self, **kwargs):
SingletonConfigurable.__init__(self, **kwargs)
# 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()
def _config_changed(self, name, old, new):
@@ -157,7 +157,7 @@ def init_logging(self):
"""Start logging for this application.
The default is to log to stdout using a StreaHandler. The log level
- starts at loggin.WARN, but this can be adjusted by setting the
+ starts at loggin.WARN, but this can be adjusted by setting the
``log_level`` attribute.
"""
self.log = logging.getLogger(self.__class__.__name__)
@@ -174,36 +174,36 @@ def init_logging(self):
def initialize(self, argv=None):
"""Do the basic steps to configure me.
-
+
Override in subclasses.
"""
self.parse_command_line(argv)
-
-
+
+
def start(self):
"""Start the app mainloop.
-
+
Override in subclasses.
"""
if self.subapp is not None:
return self.subapp.start()
-
+
def print_alias_help(self):
"""Print the alias part of the help."""
if not self.aliases:
return
-
+
lines = []
classdict = {}
for cls in self.classes:
# include all parents (up to, but excluding Configurable) in available names
for c in cls.mro()[:-3]:
classdict[c.__name__] = c
-
+
for alias, longname in self.aliases.iteritems():
classname, traitname = longname.split('.',1)
cls = classdict[classname]
-
+
trait = cls.class_traits(config=True)[traitname]
help = cls.class_get_trait_help(trait).splitlines()
# reformat first line
@@ -213,20 +213,20 @@ def print_alias_help(self):
lines.extend(help)
# lines.append('')
print os.linesep.join(lines)
-
+
def print_flag_help(self):
"""Print the flag part of the help."""
if not self.flags:
return
-
+
lines = []
for m, (cfg,help) in self.flags.iteritems():
prefix = '--' if len(m) > 1 else '-'
lines.append(prefix+m)
lines.append(indent(dedent(help.strip())))
# lines.append('')
print os.linesep.join(lines)
-
+
def print_options(self):
if not self.flags and not self.aliases:
return
@@ -240,12 +240,12 @@ def print_options(self):
self.print_flag_help()
self.print_alias_help()
print
-
+
def print_subcommands(self):
"""Print the subcommand part of the help."""
if not self.subcommands:
return
-
+
lines = ["Subcommands"]
lines.append('-'*len(lines[0]))
lines.append('')
@@ -258,15 +258,15 @@ def print_subcommands(self):
lines.append(indent(dedent(help.strip())))
lines.append('')
print os.linesep.join(lines)
-
+
def print_help(self, classes=False):
"""Print the help for each Configurable class in self.classes.
-
+
If classes=False (the default), only flags and aliases are printed.
"""
self.print_subcommands()
self.print_options()
-
+
if classes:
if self.classes:
print "Class parameters"
@@ -275,7 +275,7 @@ def print_help(self, classes=False):
for p in wrap_paragraphs(self.keyvalue_description):
print p
print
-
+
for cls in self.classes:
cls.class_print_help()
print
@@ -315,21 +315,21 @@ def update_config(self, config):
# Save the combined config as self.config, which triggers the traits
# events.
self.config = newconfig
-
+
def initialize_subcommand(self, subc, argv=None):
"""Initialize a subcommand with argv."""
subapp,help = self.subcommands.get(subc)
-
+
if isinstance(subapp, basestring):
subapp = import_item(subapp)
-
+
# clear existing instances
self.__class__.clear_instance()
# instantiate
self.subapp = subapp.instance()
# and initialize subapp
self.subapp.initialize(argv)
-
+
def parse_command_line(self, argv=None):
"""Parse the command line arguments."""
argv = sys.argv[1:] if argv is None else argv
@@ -340,7 +340,7 @@ def parse_command_line(self, argv=None):
if re.match(r'^\w(\-?\w)*$', subc) and subc in self.subcommands:
# it's a subcommand, and *not* a flag or class parameter
return self.initialize_subcommand(subc, subargv)
-
+
if '-h' in argv or '--help' in argv or '--help-all' in argv:
self.print_description()
self.print_help('--help-all' in argv)
@@ -350,7 +350,7 @@ def parse_command_line(self, argv=None):
if '--version' in argv:
self.print_version()
self.exit(0)
-
+
loader = KVArgParseConfigLoader(argv=argv, aliases=self.aliases,
flags=self.flags)
try:
@@ -383,7 +383,7 @@ def load_config_file(self, filename, path=None):
else:
self.log.debug("Loaded config file: %s", loader.full_filename)
self.update_config(config)
-
+
def generate_config_file(self):
"""generate default config file from Configurables"""
lines = ["# Configuration file for %s."%self.name]
@@ -404,10 +404,10 @@ def exit(self, exit_status=0):
def boolean_flag(name, configurable, set_help='', unset_help=''):
"""Helper for building basic --trait, --no-trait flags.
-
+
Parameters
----------
-
+
name : str
The name of the flag.
configurable : str
@@ -416,20 +416,20 @@ def boolean_flag(name, configurable, set_help='', unset_help=''):
help string for --name flag
unset_help : unicode
help string for --no-name flag
-
+
Returns
-------
-
+
cfg : dict
A dict with two keys: 'name', and 'no-name', for setting and unsetting
the trait, respectively.
"""
# default helpstrings
set_help = set_help or "set %s=True"%configurable
unset_help = unset_help or "set %s=False"%configurable
-
+
cls,trait = configurable.split('.')
-
+
setter = {cls : {trait : True}}
unsetter = {cls : {trait : False}}
return {name : (setter, set_help), 'no-'+name : (unsetter, unset_help)}
Oops, something went wrong.

0 comments on commit 34c1043

Please sign in to comment.