Из России? Тебе сюда --> русскоязычная версия.

Simple_file_user is the package for easy working with files. This package has some functions and one class for working with files.

Installing

To install this package write in command line:
python -m pip install simple_file_user

Quick start.

To import class use:
from simple_file_user.File import File
This imports File class from package. Let's make new file with it:
file = File("file.txt", "utf-8", True)
Let's write something into our file:
file.rewrite("Something.")
And check if has it written into file by read function:
file.read()
Output:
Something

Importing

import simple_file_user # Importing all, but you can call package's facilities only with the prefix simple_file_user.
from simple_file_user import * # Importing all from the package.
from simple_file_user import name_of_function # Importing certain function or functions.
from simple_file_user.File import File # Importing File class.

Functions overview

This is list of functions included this package: If you want to learn more about them use help(name_of_function). So you will get a more extended description.

File class

There is a file class in this package. It is situated in module named File. It has two private fields. They are path and encoding. There are methods getPath() and getEncoding() to get value from these fields.

Creating file object.

File(path: str, , encoding: str = "utf-8", new: bool = False)

Methods overview

Compairing File objects.

You can compair File objects. If you try to compair File object and something else, you will get a TypeError. Compairing operators == and != compair content of given Files. Others (< > <= >=) compair their size.