pybrafile Readme 📜
Brainstorming package to manage texte files
Installation ⚡
Opérating system : Windows, MacOS & Linux :
Available function/class 📑
to create => FileUtils(afilename, adeffolder)
adeffolder : folder to read/write file. if not exist it will created (optionnal).
afilename : the file name to read/write
to open file => openfile(self, amode = 'r', aencoding = 'utf-8')->bool:
amode : mode to open file (a = append, w = overrite file, see doc for more)
by default r = read
aencoding : encoding file by default utf-8
to write line => writeln(aline)
aline : a line to add in file. you need to add \n at the end to CRLF.
to read all file to a string => readfile()
read all file and return the file in a string.
to read all line of file to a list => readlns()
read all line of file and return a list of string.
to close line => close()
read all line of file and return a list of string.
TFileError enumeration of error codes
NONE = 0 => No error
FOLDERNFOUND = 1 => Foleder not found
FILENFOUND = 2 => File not fount
SYSTEM = 3 => System error
Howto use 📰
import pybrafile
file = pybrafile.FileUtils('testlog.txt')
file.openfile('w')
file.writeln('fist line\r')
file.writeln('second line\r')
file.close()
file.openfile('r')
txt = file.readfile()
file.close()
print(txt)
print(pybrafile.version())
Meta 💬
Brainstorming – Support.erp@brainstorming.eu
Distributed under the MIT license. See LICENSE for more information.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybrafile-0.1.3.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybrafile-0.1.3.tar.gz.
File metadata
- Download URL: pybrafile-0.1.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33764b0b19c9cc1b699d173971d2541a37f9d0e5765428482f3e9c72df0e9be6
|
|
| MD5 |
7fd5013114299291073b3d08d5634643
|
|
| BLAKE2b-256 |
4e4ce5754a7d961ab159a44fe2cfa71306355bbcfdf4c85d498248a8d8d9ee67
|
File details
Details for the file pybrafile-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pybrafile-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
125cf581cded19c88b609fe852eac686abf5aa81cc9ce0b1cc3719766823f17f
|
|
| MD5 |
c7bfe43826fbb764eba6a7342043994a
|
|
| BLAKE2b-256 |
a8a9f65c2f3f1ae96a2de60f4b4ce60d5d9ff230fb1133eee9f2c313c786b5e6
|