class_docstr: A set of magics useful when controlling a parallel IPython cluster.
docstr: Toggles auto parallel mode.
  
  Once this is called, all commands typed at the command line are send to
  the engines to be executed in parallel. To control which engine are
  used, the ``targets`` attribute of the view before
  entering ``%autopx`` mode.
  
  Then you can do the following::
  
      In [25]: %autopx
      %autopx to enabled
  
      In [26]: a = 10
      Parallel execution on engine(s): [0,1,2,3]
      In [27]: print a
      Parallel execution on engine(s): [0,1,2,3]
      [stdout:0] 10
      [stdout:1] 10
      [stdout:2] 10
      [stdout:3] 10
  
      In [27]: %autopx
      %autopx disabled
docstr_tok: ["Toggles","auto","parallel","mode",".","Once","this","is","called",",","all","commands","typed","at","the","command","line","are","send","to","the","engines","to","be","executed","in","parallel",".","To","control","which","engine","are","used",",","the","``","targets","``","attribute","of","the","view","before","entering","``","%","autopx","``","mode",".","Then","you","can","do","the","following",":",":","In","[","25","]",":","%","autopx","%","autopx","to","enabled","In","[","26","]",":","a","=","10","Parallel","execution","on","engine","(","s",")",":","[","0,1,2,3","]","In","[","27","]",":","print","a","Parallel","execution","on","engine","(","s",")",":","[","0,1,2,3","]","[","stdout:0","]","10","[","stdout:1","]","10","[","stdout:2","]","10","[","stdout:3","]","10","In","[","27","]",":","%","autopx","%","autopx","disabled"]
code: def autopx(self, line=""):
      """Toggles auto parallel mode.
  
      Once this is called, all commands typed at the command line are send to
      the engines to be executed in parallel. To control which engine are
      used, the ``targets`` attribute of the view before
      entering ``%autopx`` mode.
  
      Then you can do the following::
  
          In [25]: %autopx
          %autopx to enabled
  
          In [26]: a = 10
          Parallel execution on engine(s): [0,1,2,3]
          In [27]: print a
          Parallel execution on engine(s): [0,1,2,3]
          [stdout:0] 10
          [stdout:1] 10
          [stdout:2] 10
          [stdout:3] 10
  
          In [27]: %autopx
          %autopx disabled
      """
      if self._autopx:
          self._disable_autopx()
      else:
          self._enable_autopx()
  
imports: import time
  from contextlib import contextmanager
  import inspect
  import re
  import sys
  from textwrap import dedent
  from IPython.core import magic_arguments
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, no_var_expand
  import ipyparallel
  from ..None import error
label_desc: Use image node_id 9 for calling the ParallelMagics obj's underlying member method code with example usage: obj.autopx(line) without return types