Browse Source

Bytes and Struct

pull/3/head
Jure Šorn 5 years ago
parent
commit
d6b7e80850
1 changed files with 9 additions and 2 deletions
  1. 11
      README.md

11
README.md

@ -654,16 +654,23 @@ Bytes
```
```python
<Bytes> = b''.join(<list_of_bytes>)
<Bytes> = b''.join(<list_of_Bytes>)
```
### Read Bytes from file:
### Read Bytes from file
```python
def read_bytes(filename):
with open(filename, 'rb') as file:
return file.read()
```
### Write Bytes to File
```python
def write_bytes(filename, bytes):
with open(filename, 'wb') as file:
file.write(bytes)
```
Struct
------
**This module performs conversions between Python values and C structs represented as Python bytes objects:**

Loading…
Cancel
Save