Skip to main content

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.

Release files for pybrafile 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybrafile 0.1.3
File Size Uploaded
pybrafile-0.1.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybrafile 0.1.3
File Interpreter ABI Platform
pybrafile-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / pybrafile-0.1.3.tar.gz

Download URL pybrafile-0.1.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
33764b0b19c9cc1b699d173971d2541a37f9d0e5765428482f3e9c72df0e9be6
BLAKE2b-256 checksum
How to use checksums
4e4ce5754a7d961ab159a44fe2cfa71306355bbcfdf4c85d498248a8d8d9ee67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.11 Windows/10

Release files / pybrafile-0.1.3-py3-none-any.whl

Download URL pybrafile-0.1.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
125cf581cded19c88b609fe852eac686abf5aa81cc9ce0b1cc3719766823f17f
BLAKE2b-256 checksum
How to use checksums
a8a9f65c2f3f1ae96a2de60f4b4ce60d5d9ff230fb1133eee9f2c313c786b5e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.11 Windows/10

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page