def get_access_token():
    # Get a request token
    flickr.get_request_token(oauth_callback="oob")

    print("""In order to use Flickr with Onitu, you're going to need to let \
    the Onitu Flickr app gain access to your Flickr account.

    To do so, the script is going to open a window in your web browser to the \
    Flickr website where you'll have to copy/paste a verification code back \
    here in the terminal.
    """)

    raw_input("If you're ready, press Enter.")
    # Open a browser at the authentication URL. Do this however
    # you want, as long as the user visits that URL.
    authorize_url = flickr.auth_url(perms='delete')
    webbrowser.open(authorize_url)

    # Get the verifier code from the user. Do this however you
    # want, as long as the user gives the application the code.
    verifier = raw_input("Paste the code here: ")

    try:
        verifier = unicode(verifier)
    except __HOLE__:  # in python 3
        # No unicode type, but that's ok, that's what the next function wants
        pass
    # Trade the request token for an access token
    flickr.get_access_token(verifier)
dataset/ETHPy150Open onitu/onitu/drivers/flickr/get_tokens.py/get_access_token