Re: [IronPython] Convert a PythonBuffer to a byte[]

2010-04-26 Thread Dino Viehland
Jeff wrote: > I can't seem to find any easy to convert a PythonBuffer (created in > Python and passed to C#) to a byte[]. The best solution I've found so > far is to call __getslice__ to get a string and convert that to a > byte[]. Is there a better way to so this? If not, will __getslice__ > alway

[IronPython] Convert a PythonBuffer to a byte[]

2010-04-26 Thread Jeff Hardy
I can't seem to find any easy to convert a PythonBuffer (created in Python and passed to C#) to a byte[]. The best solution I've found so far is to call __getslice__ to get a string and convert that to a byte[]. Is there a better way to so this? If not, will __getslice__ always return a string, or