How to use the pyperclip.is_available function in pyperclip

To help you get started, we’ve selected a few pyperclip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yyyyyyyan / botblocker / botblocker / View on Github external
def user_config(config_complete_path, auth):
    config = ConfigParser()
    username = input('Type in your Twitter username: ')

        auth_url = auth.get_authorization_url()
    except tweepy.TweepError:
        error(config_complete_path, 'Failed to get request token.')

    msg_auth_link = 'Access this link to authorize usage of your Twitter account: ' + bold(lightpurple(auth_url))
        msg_auth_link += ' (URL automatically copied to clipboard)'
    verifier = input('Type in the verifier code available on the authorization link: ')

        access_token, access_secret = auth.get_access_token(verifier)
    except tweepy.TweepError:
        error(config_complete_path, 'Failed to get access token.')

    config[username] = {'AccessToken':access_token, 'AccessSecret':access_secret}
    with open(config_complete_path, 'w') as configfile:
    return access_token, access_secret