hi,

I have the following code which gets an image from an email.
after getting it i need to pass it as a byteArray (byte[] in C#) to a C#
function.
i tried all sorts of things but no luck. I'm using ironPython 2.0.3

the important parts of the code are:

# getting the image from the e-mail
image = part.get_payload()

# my try to cast the str into a byteArray
byteArray = BitConverter.GetBytes(image.ToCharArray())


this last line returns 1 byte and doesn't seem to do the job.
is there any equivalent to the 'bytearray(image)' function in CPython?

thanks,
Matan
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to