amuse icon indicating copy to clipboard operation
amuse copied to clipboard

add byte datatype for channel

Open ipelupessy opened this issue 6 years ago • 5 comments

with python3 it is more involved to send bytes over channel e.g. pickled objects result in bytes, this needs to be encoded back into str for it to work this is a bit weird because underlying transport is bytes so send and receive of string should maybe also work ith bytes

ipelupessy avatar Oct 09 '19 19:10 ipelupessy

The reason for this is that send_string mechanism in channel.py expects a python str and not a bytes object. Note that the assumption is that the str only contains ascii characters, because the other side (C/ fortran) handles the string as raw bytes. I think I will change the channel to accept bytes. The only problem with this is when communicating between python processes (str will be converted to bytes)..

ipelupessy avatar Oct 10 '19 08:10 ipelupessy

on second thought: its better to add a new datatype for bytes...

ipelupessy avatar Oct 11 '19 15:10 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 04 '22 18:03 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 11 '22 17:05 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 08 '22 20:08 stale[bot]