~ellisonbg/ipython/trunk-dev

« back to all changes in this revision

Viewing changes to IPython/quarantine/ipy_winpdb.py

  • Committer: Brian Granger
  • Date: 2010-01-31 23:57:46 UTC
  • mfrom: (1109.1.113 ipython)
  • Revision ID: ellisonbg@gmail.com-20100131235746-rj81qa8klooepq2m
Merging from upstream trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import os
23
23
 
24
 
import IPython.ipapi
 
24
from IPython.core import ipapi
 
25
from IPython.core.error import UsageError
25
26
import rpdb2
26
27
 
27
 
ip = IPython.ipapi.get()
 
28
ip = ipapi.get()
28
29
 
29
30
rpdb_started = False
30
31
 
58
59
    
59
60
    path = os.path.abspath(arg)
60
61
    if not os.path.isfile(path):
61
 
        raise IPython.ipapi.UsageError("%%wdb: file %s does not exist" % path)
 
62
        raise UsageError("%%wdb: file %s does not exist" % path)
62
63
    if not rpdb_started:
63
64
        passwd = ip.db.get('winpdb_pass', None)
64
65
        if passwd is None:
80
81
    ip.magic('%run ' + arg)
81
82
    
82
83
 
83
 
ip.expose_magic('wdb', wdb_f)
 
84
ip.define_magic('wdb', wdb_f)