Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 52 lines (38 sloc) 1.172 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
"""Another file in our package."""
from urlparse import urljoin


def print_twitter_url():
    """We can lookup the urljoin method via ``<Leader>g``."""
    print urljoin('http://www.twitter.com', 'mbrochh')


def try_to_import_from_demo_py():
    """Code completion makes importing easy!"""
    print 'Try to import that method which starts with ``open_``.'


def set_breakpoint(arg1, arg2, data=None):
    """
We can set breakpoints via ``<Leader>b``.

Make sure you have ipython and ipdb installed::

pip install ipython
pip install ipdb

Then run your program from a new terminal window like so:

python demo.py

Use ``?`` to show all available commands and ``? <command>`` to show help
for a certain command.

"""
    foo = 'bar'
    result = arg1 + arg2
    import ipdb; ipdb.set_trace() # BREAKPOINT
    print 'Try to set a breakpoint before this statement.'
    print 'Then run ``python demo.py``.'
    import ipdb; ipdb.set_trace() # BREAKPOINT
    print 'Good bye!'

    # Nice commands to try in ipdb:
    # ?
    # help a
    # a
    # l
    # next
    # inspect data
    # bt
    # u
    # s
    # c
    # exit
Something went wrong with that request. Please try again.