[IPython-dev] Fwd: IPython Crash Report

Ville M. Vainio vivainio@gmail....
Tue Sep 30 16:05:09 CDT 2008


---------- Forwarded message ----------
From: Kevin Northover <knorthover@sapient.com>
Date: Wed, Oct 1, 2008 at 12:02 AM
Subject: IPython Crash Report
To: "vivainio@gmail.com" <vivainio@gmail.com>


***************************************************************************

IPython post-mortem report

IPython version: 0.9.1

SVN revision   : 1145

Platform info  : os.name -> nt, sys.platform -> win32

***************************************************************************

Current user configuration structure:

{'Version': 0,
'__allownew': False,
'alias': [],
'args': [],
'autocall': 2,
'autoedit_syntax': 0,
'autoexec': [],
'autoindent': 1,
'automagic': 1,
'banner': 'IPython 0.9.1   [on Py 2.5.2]\n',
'c': '',
'cache_size': 1000,
'classic': 0,
'color_info': 1,
'colors': 'Linux',
'confirm_exit': 1,
'debug': 0,
'deep_reload': 0,
'editor': 'D:\\Apps\\IDM Computer Solutions\\UltraEdit-32\\uedit32.exe',
'embedded': False,
'execfile': [],
'execute': [''],
'gthread': 0,
'help': 0,
'import_all': [],
'import_mod': [],
'import_some': [[]],
'include': [],
'interact': 0,
'ipythondir': 'C:\\Documents and Settings\\knorth\\_ipython',
'log': 0,
'logfile': '',
'logplay': '',
'magic_docstrings': 0,
'messages': 1,
'multi_line_specials': 1,
'nosep': 0,
'object_info_string_level': 0,
'opts': Struct({'__allownew': True, 'logfile': 'critical_log.txt', 'pylab': 1}),
'pdb': 0,
'pprint': 1,
'profile': '',
'prompt_in1': '\\C_LightBlue[\\C_LightCyan\\Y2\\C_LightBlue]\\C_Green|\\#> ',
'prompt_in2': '\\C_Green|\\C_LightGreen\\D\\C_Green> ',
'prompt_out': '<\\#> ',
'prompts_pad_left': '1',
'pydb': 0,
'pylab': 1,
'pylab_import_all': 1,
'q4thread': 0,
'qthread': 0,
'quick': 0,
'quiet': 0,
'rcfile': 'ipythonrc.ini',
'readline': 1,
'readline_merge_completions': 1,
'readline_omit__names': 0,
'readline_parse_and_bind': ['tab: complete',
                             '"\\C-l": possible-completions',
                             'set show-all-if-ambiguous on',
                             '"\\C-o": tab-insert',
                             '"\\M-i": "    "',
                             '"\\M-o": "\\d\\d\\d\\d"',
                             '"\\M-I": "\\d\\d\\d\\d"',
                             '"\\C-r": reverse-search-history',
                             '"\\C-s": forward-search-history',
                             '"\\C-p": history-search-backward',
                             '"\\C-n": history-search-forward',
                             '"\\e[A": history-search-backward',
                             '"\\e[B": history-search-forward',
                             '"\\C-k": kill-line',
                             '"\\C-u": unix-line-discard'],
'readline_remove_delims': '-/~',
'screen_length': -1,
'separate_in': '',
'separate_out': '',
'separate_out2': '',
'system_header': 'IPython system call: ',
'system_verbose': 0,
'term_title': 1,
'tk': 0,
'upgrade': 0,
'wildcards_case_sensitive': 1,
'wthread': 0,
'wxversion': '0',
'xmode': 'Context'}

***************************************************************************

Crash traceback:

---------------------------------------------------------------------------
TypeError                         Python 2.5.2: D:\Apps\python25\python.exe
                                                   Tue Sep 30 16:58:29 2008
A problem occured executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.

D:\Apps\python25\scripts\ipython.py in <module>()
     13
     14 [or simply IPython.Shell.IPShell().mainloop(1) ]
     15
     16 and IPython will be your working environment when you start
python. The final
     17 sys.exit() call will make python exit transparently when
IPython finishes, so
     18 you don't have an extra prompt to get out of.
     19
     20 This is probably useful to developers who manage multiple
Python versions and
     21 don't want to have correspondingly multiple IPython versions.
Note that in
     22 this mode, there is no way to pass IPython any command-line
options, as those
     23 are trapped first by Python itself.
     24 """
     25
     26 import IPython.Shell
     27
---> 28 IPython.Shell.start().mainloop()
        global IPython.Shell.start.mainloop = undefined
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43

D:\Apps\python25\lib\site-packages\IPython\Shell.pyc in
mainloop(self=<IPython.Shell.IPShellMatplotlib instance at
0x013416E8>, sys_exit=0, banner=None)
     66 #-----------------------------------------------------------------------------
     67 # This class is trivial now, but I want to have it in to publish a clean
     68 # interface. Later when the internals are reorganized, code
that uses this
     69 # shouldn't have to change.
     70
     71 class IPShell:
     72     """Create an IPython instance."""
     73
     74     def __init__(self,argv=None,user_ns=None,user_global_ns=None,
     75                  debug=1,shell_class=InteractiveShell):
     76         self.IP = make_IPython(argv,user_ns=user_ns,
     77                                user_global_ns=user_global_ns,
     78                                debug=debug,shell_class=shell_class)
     79
     80     def mainloop(self,sys_exit=0,banner=None):
---> 81         self.IP.mainloop(banner)
        global resumes. = undefined
     82         if sys_exit:
     83             sys.exit()
     84
     85 #-----------------------------------------------------------------------------
     86 def kill_embedded(self,parameter_s=''):
     87     """%kill_embedded : deactivate for good the current
embedded IPython.
     88
     89     This function (after asking for confirmation) sets an
internal flag so that
     90     an embedded IPython will never activate again.  This is useful to
     91     permanently disable a shell that is being called inside a
loop: once you've
     92     figured out what you needed from it, you may then kill it
and the program
     93     will then continue to run without the interactive shell
interfering again.
     94     """
     95
     96     kill = ask_yes_no("Are you sure you want to kill this
embedded instance "

D:\Apps\python25\lib\site-packages\IPython\iplib.pyc in
mainloop(self=<IPython.Shell.MatplotlibShell object at 0x00BF0E30>,
banner='IPython 0.9.1   [on Py 2.5.2]\n')
   1562         internally created default banner."""
   1563
   1564         if self.rc.c:  # Emulate Python's -c option
   1565             self.exec_init_cmd()
   1566         if banner is None:
   1567             if not self.rc.banner:
   1568                 banner = ''
   1569             # banner is string? Use it directly!
   1570             elif isinstance(self.rc.banner,basestring):
   1571                 banner = self.rc.banner
   1572             else:
   1573                 banner = self.BANNER+self.banner2
   1574
   1575         while 1:
   1576             try:
-> 1577                 self.interact(banner)
   1578                 #self.interact_with_readline()
   1579                 # XXX for testing of a readline-decoupled repl
loop, call interact_with_readline above
   1580
   1581                 break
   1582             except KeyboardInterrupt:
   1583                 # this should not be necessary, but KeyboardInterrupt
   1584                 # handling seems rather unpredictable...
   1585                 self.write("\nKeyboardInterrupt in interact()\n")
   1586
   1587     def exec_init_cmd(self):
   1588         """Execute a command given at the command line.
   1589
   1590         This emulates Python's -c option."""
   1591
   1592         #sys.argv = ['-c']

D:\Apps\python25\lib\site-packages\IPython\iplib.pyc in
interact(self=<IPython.Shell.MatplotlibShell object at 0x00BF0E30>,
banner='IPython 0.9.1   [on Py 2.5.2]\n')
   1798                 if self.autoindent:
   1799                     self.rl_do_indent = False
   1800                     self.readline_startup_hook(None)
   1801                 self.write('\n')
   1802                 self.exit()
   1803             except bdb.BdbQuit:
   1804                 warn('The Python debugger has exited with a
BdbQuit exception.\n'
   1805                      'Because of how pdb handles the stack, it
is impossible\n'
   1806                      'for IPython to properly format this
particular exception.\n'
   1807                      'IPython will resume normal operation.')
   1808             except:
   1809                 # exceptions here are VERY RARE, but they can
be triggered
   1810                 # asynchronously by signal handlers, for example.
   1811                 self.showtraceback()
   1812             else:
-> 1813                 more = self.push(line)
   1814                 if (self.SyntaxTB.last_syntax_error and
   1815                     self.rc.autoedit_syntax):
   1816                     self.edit_syntax_error()
   1817
   1818         # We are off again...
   1819         __builtin__.__dict__['__IPYTHON__active'] -= 1
   1820
   1821     def excepthook(self, etype, value, tb):
   1822       """One more defense for GUI apps that call sys.excepthook.
   1823
   1824       GUI frameworks like wxPython trap exceptions and call
   1825       sys.excepthook themselves.  I guess this is a feature that
   1826       enables them to keep running after exceptions that would
   1827       otherwise kill their mainloop. This is a bother for IPython
   1828       which excepts to catch all of the program exceptions with a try:

D:\Apps\python25\lib\site-packages\IPython\iplib.pyc in
push(self=<IPython.Shell.MatplotlibShell object at 0x00BF0E30>,
line=u'C.grid_layout(G)')
   2103         is reset; otherwise, the command is incomplete, and the buffer
   2104         is left as it was after the line was appended.  The return
   2105         value is 1 if more input is required, 0 if the line was dealt
   2106         with in some way (this is the same as runsource()).
   2107         """
   2108
   2109         # autoindent management should be done here, and not in the
   2110         # interactive loop, since that one is only seen by
keyboard input.  We
   2111         # need this done correctly even for code run via
runlines (which uses
   2112         # push).
   2113
   2114         #print 'push line: <%s>' % line  # dbg
   2115         for subline in line.splitlines():
   2116             self.autoindent_update(subline)
   2117         self.buffer.append(line)
-> 2118         more = self.runsource('\n'.join(self.buffer), self.filename)
   2119         if not more:
   2120             self.resetbuffer()
   2121         return more
   2122
   2123     def split_user_input(self, line):
   2124         # This is really a hold-over to support ipapi and some
extensions
   2125         return prefilter.splitUserInput(line)
   2126
   2127     def resetbuffer(self):
   2128         """Reset the input buffer."""
   2129         self.buffer[:] = []
   2130
   2131     def raw_input(self,prompt='',continue_prompt=False):
   2132         """Write a prompt and read a line.
   2133

D:\Apps\python25\lib\site-packages\IPython\iplib.pyc in
runsource(self=<IPython.Shell.MatplotlibShell object at 0x00BF0E30>,
source='C.grid_layout(G)', filename='<ipython console>',
symbol='single')
   2029             # Case 1
   2030             self.showsyntaxerror(filename)
   2031             return None
   2032
   2033         if code is None:
   2034             # Case 2
   2035             return True
   2036
   2037         # Case 3
   2038         # We store the code object so that threaded shells and
   2039         # custom exception handlers can access all this info if needed.
   2040         # The source corresponding to this can be obtained from the
   2041         # buffer attribute as '\n'.join(self.buffer).
   2042         self.code_to_run = code
   2043         # now actually execute the code object
-> 2044         if self.runcode(code) == 0:
   2045             return False
   2046         else:
   2047             return None
   2048
   2049     def runcode(self,code_obj):
   2050         """Execute a code object.
   2051
   2052         When an exception occurs, self.showtraceback() is
called to display a
   2053         traceback.
   2054
   2055         Return value: a flag indicating whether the code to be
run completed
   2056         successfully:
   2057
   2058           - 0: successful execution.
   2059           - 1: an error occurred.

D:\Apps\python25\lib\site-packages\IPython\iplib.pyc in
runcode(self=<IPython.Shell.MatplotlibShell object at 0x00BF0E30>,
code_obj=<code object <module> at 00BE3800, file "<ipython console>",
line 1>)
   2071             try:
   2072                 self.hooks.pre_runcode_hook()
   2073                 exec code_obj in self.user_global_ns, self.user_ns
   2074             finally:
   2075                 # Reset our crash handler in place
   2076                 sys.excepthook = old_excepthook
   2077         except SystemExit:
   2078             self.resetbuffer()
   2079             self.showtraceback()
   2080             warn("Type %exit or %quit to exit IPython "
   2081                  "(%Exit or %Quit do so unconditionally).",level=1)
   2082         except self.custom_exceptions:
   2083             etype,value,tb = sys.exc_info()
   2084             self.CustomTB(etype,value,tb)
   2085         except:
-> 2086             self.showtraceback()
   2087         else:
   2088             outflag = 0
   2089             if softspace(sys.stdout, 0):
   2090                 print
   2091         # Flush out code object which has been run (and source)
   2092         self.code_to_run = None
   2093         return outflag
   2094
   2095     def push(self, line):
   2096         """Push a line to the interpreter.
   2097
   2098         The line should not have a trailing newline; it may have
   2099         internal newlines.  The line is appended to a buffer and the
   2100         interpreter's runsource() method is called with the
   2101         concatenated contents of the buffer as source.  If this

D:\Apps\python25\lib\site-packages\IPython\iplib.pyc in
showtraceback(self=<IPython.Shell.MatplotlibShell object at
0x00BF0E30>, exc_tuple=None, filename=None, tb_offset=None)
   1534                 self.showsyntaxerror(filename)
   1535             elif etype is IPython.ipapi.UsageError:
   1536                 print "UsageError:", value
   1537             else:
   1538                 # WARNING: these variables are somewhat
deprecated and not
   1539                 # necessarily safe to use in a threaded
environment, but tools
   1540                 # like pdb depend on their existence, so let's
set them.  If we
   1541                 # find problems in the field, we'll need to
revisit their use.
   1542                 sys.last_type = etype
   1543                 sys.last_value = value
   1544                 sys.last_traceback = tb
   1545
   1546                 if etype in self.custom_exceptions:
   1547                     self.CustomTB(etype,value,tb)
   1548                 else:
-> 1549
self.InteractiveTB(etype,value,tb,tb_offset=tb_offset)
   1550                     if self.InteractiveTB.call_pdb and
self.has_readline:
   1551                         # pdb mucks up readline, fix it back
   1552                         self.set_completer()
   1553         except KeyboardInterrupt:
   1554             self.write("\nKeyboardInterrupt\n")
   1555
   1556
   1557
   1558     def mainloop(self,banner=None):
   1559         """Creates the local namespace and starts the mainloop.
   1560
   1561         If an optional banner argument is given, it will override the
   1562         internally created default banner."""
   1563
   1564         if self.rc.c:  # Emulate Python's -c option

D:\Apps\python25\lib\site-packages\IPython\ultraTB.pyc in
__call__(self=<IPython.ultraTB.AutoFormattedTB instance at
0x00DC63A0>, etype=<type 'exceptions.IndexError'>,
evalue=IndexError('list index out of range',), etb=<traceback object
at 0x00CDDE90>, out=<IPython.genutils.IOStream instance at
0x0133EB98>, tb_offset=None)
    990           - tb_offset: the number of frames to skip over in
the stack, on a
    991           per-call basis (this overrides temporarily the
instance's tb_offset
    992           given at initialization time.  """
    993
    994         if out is None:
    995             out = Term.cerr
    996         Term.cout.flush()
    997         if tb_offset is not None:
    998             tb_offset, self.tb_offset = self.tb_offset, tb_offset
    999             print >> out, self.text(etype, evalue, etb)
   1000             self.tb_offset = tb_offset
   1001         else:
   1002             print >> out, self.text(etype, evalue, etb)
   1003         out.flush()
   1004         try:
-> 1005             self.debugger()
   1006         except KeyboardInterrupt:
   1007             print "\nKeyboardInterrupt"
   1008
   1009     def text(self,etype=None,value=None,tb=None,context=5,mode=None):
   1010         if etype is None:
   1011             etype,value,tb = sys.exc_info()
   1012         self.tb = tb
   1013         return FormattedTB.text(self,etype,value,tb,context=5,mode=mode)
   1014
   1015 #---------------------------------------------------------------------------
   1016 # A simple class to preserve Nathan's original functionality.
   1017 class ColorTB(FormattedTB):
   1018     """Shorthand to initialize a FormattedTB in Linux colors mode."""
   1019     def __init__(self,color_scheme='Linux',call_pdb=0):
   1020         FormattedTB.__init__(self,color_scheme=color_scheme,

D:\Apps\python25\lib\site-packages\IPython\ultraTB.pyc in
debugger(self=<IPython.ultraTB.AutoFormattedTB instance at
0x00DC63A0>, force=False)
    832           The 'force' option forces the debugger to activate
even if the flag
    833           is false.
    834
    835         If the call_pdb flag is set, the pdb interactive debugger is
    836         invoked. In all cases, the self.tb reference to the
current traceback
    837         is deleted to prevent lingering references which hamper memory
    838         management.
    839
    840         Note that each call to pdb() does an 'import
readline', so if your app
    841         requires a special setup for the readline completers,
you'll have to
    842         fix that by hand after invoking the exception handler."""
    843
    844         if force or self.call_pdb:
    845             if self.pdb is None:
    846                 self.pdb = Debugger.Pdb(
--> 847                     self.color_scheme_table.active_scheme_name)
    848             # the system displayhook may have changed, restore
the original
    849             # for pdb
    850             dhook = sys.displayhook
    851             sys.displayhook = sys.__displayhook__
    852             self.pdb.reset()
    853             # Find the right frame so we don't pop up inside
ipython itself
    854             if hasattr(self,'tb'):
    855                 etb = self.tb
    856             else:
    857                 etb = self.tb = sys.last_traceback
    858             while self.tb.tb_next is not None:
    859                 self.tb = self.tb.tb_next
    860             try:
    861                 if etb and etb.tb_next:
    862                     etb = etb.tb_next

D:\Apps\python25\lib\site-packages\IPython\Debugger.pyc in
__init__(self=<IPython.Debugger.Pdb instance at 0x02DE95A8>,
color_scheme='Linux', completekey=None, stdin=None, stdout=None)
    167         out = outfile.readlines()
    168         outfile.close()
    169         return out
    170
    171 class Pdb(OldPdb):
    172     """Modified Pdb class, does not load readline."""
    173
    174     if sys.version[:3] >= '2.5' or has_pydb:
    175         def __init__(self,color_scheme='NoColor',completekey=None,
    176                      stdin=None, stdout=None):
    177
    178             # Parent constructor:
    179             if has_pydb and completekey is None:
    180                 OldPdb.__init__(self,stdin=stdin,stdout=Term.cout)
    181             else:
--> 182                 OldPdb.__init__(self,completekey,stdin,stdout)
        global _ = undefined
        global q = undefined
        global Wt = undefined
        global i = undefined
        global d = undefined
        global IJWn = undefined
        global t = undefined
        global j = undefined
    183
    184             self.prompt = prompt # The default prompt is '(Pdb)'
    185
    186             # IPython changes...
    187             self.is_pydb = has_pydb
    188
    189             if self.is_pydb:
    190
    191                 # iplib.py's ipalias seems to want pdb's checkline
    192                 # which located in pydb.fn
    193                 import pydb.fns
    194                 self.checkline = lambda filename, lineno: \
    195                                  pydb.fns.checkline(self,
filename, lineno)
    196
    197                 self.curframe = None

D:\Apps\python25\lib\pdb.pyc in __init__(self=<IPython.Debugger.Pdb
instance at 0x02DE95A8>, completekey=None, stdin=None, stdout=None)
     41         lineno = lineno + 1
     42     fp.close()
     43     return answer
     44
     45
     46 # Interaction prompt line will separate file and call info from code
     47 # text using value of line_prefix string.  A newline and arrow may
     48 # be to your liking.  You can set it once pdb is imported using the
     49 # command "pdb.line_prefix = '\n% '".
     50 # line_prefix = ': '    # Use this to get the old situation back
     51 line_prefix = '\n-> '   # Probably a better default
     52
     53 class Pdb(bdb.Bdb, cmd.Cmd):
     54
     55     def __init__(self, completekey='tab', stdin=None, stdout=None):
---> 56         bdb.Bdb.__init__(self)
        global __exception__R = undefined
     57         cmd.Cmd.__init__(self, completekey, stdin, stdout)
     58         if stdout:
     59             self.use_rawinput = 0
     60         self.prompt = '(Pdb) '
     61         self.aliases = {}
     62         self.mainpyfile = ''
     63         self._wait_for_mainpyfile = 0
     64         # Try to load readline if it exists
     65         try:
     66             import readline
     67         except ImportError:
     68             pass
     69
     70         # Read $HOME/.pdbrc and ./.pdbrc
     71         self.rcLines = []

TypeError: unbound method __init__() must be called with Bdb instance
as first argument (got Pdb instance instead)

***************************************************************************

History of session input:
import networkx as NX
G = NX.dodecahedral_graph()
G.nodes()
NX.draw(G)
edges = [ (4, 1), (4, 7), (1, 2), (7, 3), (2, 13),  (2, 17), (13, 24),
(17, 24), (3, 24) ]
G = NX.DiGraph()
G.add_edges_from(edges)
G.nodes()
G.edges()
NX.draw(G)
NX.write_edgelist(G, edges.txt)
NX.write_edgelist(G, 'edges.txt')
G = NX.Graph
G.add_edges_from(edges)
G = NX.Graph()
G.add_edges_from(edges)
NX.draw(G)
NX.draw(G)
G = NX.XDiGraph()
_I7
In[7]
G.nodes()
?%exec
#?exec
exec _i14
G.nodes()
NX.draw(G)
NX.draw(G)
help(draw)
NX.draw(G)
help(NX.draw)
help(scatter)
help(draw)
help(savefig)
NX.draw_graphviz(G)
NX.draw_shell(G)
NX.draw_spectral(G)
NX.draw(G)
G.degree()
help(G.degree)
G.degree(labels=True)
G.degree(with_labels=True)
G.in_degree(with_labels=True)
G.out_degree(with_labels=True)
G.diameter
diameter(G)
NX.diameter(G)
NX.topological_sort(G)
help(G)
help(G.successors_iter)
for s in G.successors_iter():
    print s
for n in G.nodes():
    for s in G.successors_iter(n):
        print n, " - ", s
help(G.has_predecessor)
len(G.predecessors(24))
def longest_path_length_to sink(G, sink):
def longest_path_length_to_sink(G, sink):
    pred = G.predecessors(sink)
    if pred:
        d = [longest_path(G, p) for p in pred]
        return max(d) + 1
    else:
        return 0
longest_path_length_to_sink(G, 24)
def longest_path_length_to_sink(G, sink):
    pred = G.predecessors(sink)
    if pred:
        d = [longest_path_length_to_sink(G, p) for p in pred]
        return max(d) + 1
    else"
def longest_path_length_to_sink(G, sink):
    pred = G.predecessors(sink)
    if pred:
        d = [longest_path_length_to_sink(G, p) for p in pred]
        return max(d) + 1
    else:
        return 0
longest_path_length_to_sink(G, 24)
edges
g2 = NX.grid_2d_graph(4,4)
NX.draw(g2)
_ip.magic(r"cd D:\MyDocuments\Projects\network")
_ip.system("dir /on ")
import critical as C
C.longest_path_to_sink(G, 24)
_ip.magic("dreload C")
_ip.magic("reload C")
dreload(C)
C.longest_path_to_sink(G, 24)
a = [1, 2, 3]
b = a + 1
b = a + [4]
b
dreload(C)
C.longest_path_to_sink(G, 24)
dreload(C)
C.longest_path_to_sink(G, 24)
C.longest_path_length_to_sink(G, 24)
_ip.magic("doctest_mode ")
_ip.magic("logstart critical_log.txt")
edges = [ (4, 1), (4, 7), (1, 2), (7, 3), (2, 13),  (2, 17), (13, 24),
(17, 24), (3, 24) ]
G = NX.XDiGraph()
G.add_edges_from(edges)
C.longest_path_length_to_sink(G, 24)
C.longest_path_to_sink(G, 24)
_ip.magic("logoff ")
_ip.magic("logon ")
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
lp = C.all_longest_paths(G, 24)
dreload(C)
C.all_longest_paths(G, 24)
_ip.magic("logoff ")
_ip.magic("doctest_mode ")
help(draw)
help(NX.draw)
lp
l = max([ len(v) - 1 for v in lp.values])
l = max([ len(v) - 1 for v in lp.values()])
l
n = {}
for v in lp.values():
    x = len(v) - 1
    n[x] = 1 + n.get(x, 0)
n
max(n.values())
xincr = 1.0 / l
yincr = 1.0 / n
yincr = 1.0 / max(n.values())
xvals = [ (xincr/2) + xincr * i for i in range(l)]
xvals
yvals = [yincr/2 + yincr * i for i in range(n)]
yvals = [yincr/2 + yincr * i for i in range(max(n.values()))]
yvals
_ip.magic("hist -n")
dreload(C)
C.grid_coordinates(lp)
_ip.magic("doctest_mode ")
C.grid_coordinates(lp)
_ip.magic("doctest_mode ")
help(NX.draw)
x = 2
(2 * (x / 2))
x = 3
(2 * (x / 2))
dreload(C)
dreload(C)
vpos = C.grid_layout(G)
help(NX.successors)
help(NX)
help(G.successors)
dr
dreload(C)
dreload(C)
C.grid_coordinates(lp)
C.grid_layout(lp)
help(NX.is_directed)
dreload(C)
C.grid_layout(lp)
type(G)
G.is_directed()
C.grid_layout(G)
dreload(C)
_ip.magic("pdb ")
C.grid_layout(G)

*** Last line of input (may not be in above history):
C.grid_layout(G)

Kevin Northover
Director, Technology | ¬ Sapient
One Penn Plaza, 24th Floor, Suite 2400
New York, NY  10119 USA
desk: +1.212.560.5733
fax: +1.212.560.5701
e-mail: knorthover@sapient.com





-- 
Ville M. Vainio
http://tinyurl.com/vainio


More information about the IPython-dev mailing list