Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

added 2 characters in body; edited title
Source Link
user3717023
user3717023

read Read in binary data with python

iI am very new to Python and iI am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

>>> Begin of header <<<
value1: 5
value2: 7
...
value65: 9
>>> End of header <<<
���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���`aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@����
Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���`Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that iI did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

read in binary data with python

i am very new to Python and i am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

>>> Begin of header <<<
value1: 5
value2: 7
...
value65: 9
>>> End of header <<<
���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���`aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@����
Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���`Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that i did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

Read in binary data with python

I am very new to Python and I am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

>>> Begin of header <<<
value1: 5
value2: 7
...
value65: 9
>>> End of header <<<
���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���`aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@����
Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���`Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that I did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

added 28 characters in body
Source Link
Kasravnd
  • 107.7k
  • 19
  • 167
  • 195

i am very new to Python and i am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

Begin of header <<< value1: 5 value2: 7 ... value65: 9 End of header <<< ���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@���� Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���Ëäs@���†∏8I@���¿¬Ot@���†�6

>>> Begin of header <<<
value1: 5
value2: 7
...
value65: 9
>>> End of header <<<
���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���`aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@����
Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���`Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that i did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

i am very new to Python and i am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

Begin of header <<< value1: 5 value2: 7 ... value65: 9 End of header <<< ���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@���� Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that i did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

i am very new to Python and i am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

>>> Begin of header <<<
value1: 5
value2: 7
...
value65: 9
>>> End of header <<<
���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���`aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@����
Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���`Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that i did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

Source Link
Glostas
  • 1.2k
  • 2
  • 12
  • 22

read in binary data with python

i am very new to Python and i am trying to read in a file that partially contains binary data. There is a header with some information about the data and after the header binary data follow. If one opens the file in a texteditor it looks like this:

Begin of header <<< value1: 5 value2: 7 ... value65: 9 End of header <<< ���ÄI›C¿���† ̈ ̈v@���ÄW]c¿��� U⁄z@���@¬P\¿����∂:q@���@Ò ̊U¿���†÷Us@���aw4¿��� :‘m@���@À›9@���ÄAs@���¿‹ ¿����ır@���¿@&%@���†„bq@����* ̇-@��� [q@����ÚN8@���� Òo@���@√·T@���†‰zm@����9\@����ÃÜq@����€dZ@���Ëäs@���†∏8I@���¿¬Ot@���†�6

an additional problem is that i did not create the file myself and do not now if those are double or float data.

So how can I interpret those data?

lang-py

AltStyle によって変換されたページ (->オリジナル) /