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 556131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:53:15+00:00 2026-05-13T11:53:15+00:00

(in case you’re curious about motivation: this will be used in a scons build

  • 0

(in case you’re curious about motivation: this will be used in a scons build to generate a C file containing a GUID)

I found the question about generating a GUID in python. But I don’t really know much about programming python. Could someone help me convert this to a string of the form

"{0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**, 0x**}"

where the **’s are filled in with the GUID bytes in 2-digit hex form?

def getInitializer(someUUID):
    hexByteList = [??? for b in someUUID.bytes]
    return '{'+(', '.join(hexByteList))+'}'

I’m not sure what to use for the “???” above.

  • 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-13T11:53:15+00:00Added an answer on May 13, 2026 at 11:53 am
    hex(ord(b))
    

    …

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

Sidebar

Related Questions

Case 1: I have passed a variable to a external js file like this
the case is, user will open a aspx to look for file generated in
Case i'm trying to write a GWTTestCase for a certain class, used as a
Simple case, trying to code a cmdlet that will prompt the user to confirm
Given: case class FirstCC { def name: String = ... // something that will
Simplest case: You want to make a text file which says The MD5 hash
Case: I receive a JSON string from third-party server, containing a list of objects.
Case: Developing a standalone java client which will run on different locations on multiple
Case this works: Seq(fromDir, toDir) find (!_.isDirectory) foreach (println(_)) Whereas this doesn't: Seq(fromDir, toDir)
Case 1: BufferedReader br = new BufferedReader( new InputStreamReader( new FileInputStream(file) ) ); br.close();

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.