[python-win32] Array of 64 bit int

Marc-Andre Belzile Marc-Andre.Belzile at autodesk.com
Tue Aug 11 20:58:22 CEST 2009


My goal is to use an array of 64 bit integers in python to store byte values and pass the array an activex object. I thought of using array but unlike struct, it doesn't support the 64 bit int type. So I'm looking for an alternative to the array module. 

e.g.
import array
a64 = array.array( 'q', ['blip blip','blop'] )

myObject.StroreArray64( a64 )

where StoreArray64 takes a safearray variant arg.

I also tried using an array of doubles for storing the bytes but that doesn't seem to work as the values are completly wrong after casting to long64.

thanks.

-mab

-----Original Message-----
From: python-win32-bounces+marc-andre.belzile=autodesk.com at python.org [mailto:python-win32-bounces+marc-andre.belzile=autodesk.com at python.org] On Behalf Of Tim Roberts
Sent: Tuesday, August 11, 2009 2:36 PM
To: Python-Win32 List
Subject: Re: [python-win32] Array of 64 bit int

Marc-Andre Belzile wrote:
>
>  
>
> This is probably not the right list for this kind of question but is
> it possible to build an array of 64 bit int with Python ?
>

Are you specifically talking about passing 64-bit ints to external
APIs?  Integers in Python are of infinite size, so the question needs a
little clarification.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32


More information about the python-win32 mailing list