Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6026301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:25:32+00:00 2026-05-23T04:25:32+00:00

I am using 2.5 on GAE using some of the Crypto modules from gdata

  • 0

I am using 2.5 on GAE using some of the Crypto modules from gdata python modules. I am able to use hashAndSign on a string, but the function returns an array.array of ‘B’ unsigned characters.

I’m still experimenting on getting it all together, but one thing I’m stumbling on now is getting an:

array('B', [120, 231, 49, 2, 125, 143, 213, 14, 214, 66, 52, 11, 124, 154, 99, 179])

to be a string representation like:

'x\xe71\x02}\x8f\xd5\x0e\xd6B4\x0b|\x9ac\xb3'

How can I get the array to be a string like that?

I know this is a simple thing, but it is stumping me.

I need this so I can do a .encode(‘base64’) to send to my client app which hopefully will be able to use it to verify the string I signed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:25:33+00:00Added an answer on May 23, 2026 at 4:25 am

    Your question title “Python 2.5 version of array.array.tostring()?” is puzzling. The tostring() method of array.array objects has been available for a very long time:

    Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    >>> import array
    >>> q = array.array('B', [120, 231, 49, 2, 125, 143, 213, 14, 214, 66, 52, 11, 124, 154, 99, 179])
    >>> q.tostring()
    'x\3471\002}\217\325\016\326B4\013|\232c\263'
    >>>
    

    Aside: Yes, that’s right, once upon a time, repr() did octal, not hex.

    What did you actually try in Python 2.5? What was the outcome? Copy/paste the full stack trace and error message into an edit of your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop a GAE application using python, but I fear that Google
Am working on a gae app using python. The app involves some crowd-sourced data
I have an application using vanilla OpenID support from GAE platform. I use user_id()
I want to share some modules between a python GAE project, and another python
I've setup a static website on GAE using hints found elsewhere, but can't figure
I am using Twitter4J API on GAE/J. I want to use the request token
I've been using Pydev/Eclipse to develop Google App Engine (GAE) applications but I've been
I've been using GAE for months now, but very recently I've had difficulty getting
I have made my GAE application using the development server, but now when I
I am attempting to write some tests using webtest to test out my python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.