This library writes Python object representations in a text file and reads the file to recreate the objects. An object representation is a string returned by function repr.
Project description
FRANÇAIS
Cette bibliothèque écrit la représentation d'objets Python dans un fichier
texte et lit le fichier pour recréer les objets. Une représentation d'objet
est une chaîne de caractères renvoyée par la fonction repr.
Contenu
La fonction write_reprs écrit la représentation d'objets Python dans un
fichier texte. Chaque ligne du fichier est une représentation d'objet. Si le
fichier spécifié existe déjà, cette fonction l'écrase.
Le générateur read_reprs lit un fichier texte contenant des représentations
d'objet Python dans le but de recréer ces objets. Chaque ligne du fichier doit
être une représentation d'objet. Les lignes vides sont ignorées. Chaque
itération de ce générateur produit un objet.
Pour plus d'informations, consultez la documentation des fonctions et les démos dans le dépôt de code source.
ENGLISH
This library writes Python object representations in a text file and reads the
file to recreate the objects. An object representation is a string returned by
function repr.
Content
Function write_reprs writes the representation of Python objects in a text
file. Each line in the file is an object representation. If the specified file
already exists, this function overwrites it.
Generator read_reprs reads a text file that contains the representation of
Python objects in order to recreate those objects. Each line in the file must
be an object representation. Empty lines are ignored. Each iteration of this
generator yields one object.
For more information, consult the functions' documentation and the demos in the source code repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file repr_rw-3.0.1.tar.gz.
File metadata
- Download URL: repr_rw-3.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cba36d2d8246a1e98967422db1fbac151efacc8e9099db83bc51c6928c557ec1
|
|
| MD5 |
3f7dbcd0e2a640486a8d9ac1de4223ab
|
|
| BLAKE2b-256 |
6f3607bc0af5db6c0049c2470a2371be61d12a2833ddfbe142754d5ead0d6597
|