from IPython.display import SVG, display

def show_svg():
    display(SVG(url=
        'http://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg'
        ))
Display SVG in IPython notebook from a function