def displayPublicKey(options):
    if not options['filename']:
        filename = os.path.expanduser('~/.ssh/id_rsa')
        options['filename'] = raw_input('Enter file in which the key is (%s): ' % filename)
    try:
        key = keys.Key.fromFile(options['filename']).keyObject
    except keys.BadKeyError, e:
        if e.args[0] != 'encrypted key with no passphrase':
            raise
        else:
            if not options['pass']:
                options['pass'] = getpass.getpass('Enter passphrase: ')
            key = keys.Key.fromFile(
                options['filename'], passphrase = options['pass']).keyObject
    print keys.Key(key).public().toString()
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/scripts/ckeygen.py/displayPublicKey/original