WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #19  
Old 03-07-2005, 11:06 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The value '\xhh' represents a character with a hex value of hh. In your case the character '\x80' would be equal to the hex number 0x80, which is 128. If you wanted to convert a number to this character format you would do the following:
Code:
val = chr(128)
The variable val will now hold the character '\x80'. To convert a character to the number format you would do the following:
Code:
val = ord('\x80')
I'm not sure what the pickle module does and why it converted the character to -128L, but if you are going to be reading the data character by character, then the above functions should be enough.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC