code: def genkey(outcompressed=True,prefix='80'):
      '''
      Generate new random Bitcoin private key, using os.urandom and
      double-sha256.
      '''
  
      key = prefix + genkeyhex()
      if outcompressed:
          key = key + '01'
      return b58e(keyf genkey(outcompressed=True,prefix='80'):
      '''
      Generate new random Bitcoin private key, using os.urandom and
      double-sha256.
      '''
  
      key = prefix + genkeyhex()
      if outcompressed:
          key = key + '01'
      return b58e(key)
docs: Generate new random Bitcoin private key, using os.urandom and
      double-sha256.