kitpylib.PyFile package#

Module contents#

PyFile: A useful module to process files#

How to use#

>>> import kitpylib.PyFile as pf

Available functions and class#

This module provides functions and a class to process txt files:

exists(function): tell the user whether the txt file exists
makefile(function): generate a txt file
delfile(function): delete a txt file
rename(function): rename a txt file
File(class): `read` and `write`

See documentation for the functions and classes.

Submodules#

kitpylib.PyFile.classes module#

class kitpylib.PyFile.classes.File(filename)[source]#

Bases: object

A class to process files.

load_all()[source]#
read_data(skiprows=2)[source]#
read_text(skiprows=2)[source]#
setText(a)[source]#
write(string)[source]#

kitpylib.PyFile.funcs module#

kitpylib.PyFile.funcs.delfile(filename)[source]#
kitpylib.PyFile.funcs.exists(filename, msg=True)[source]#

Confirm a file exists or not(Any files are okay).

kitpylib.PyFile.funcs.make(filename, blank=True)[source]#

If blank, the system will leave the txt file blank. If not, the system will add author and time to the file.

kitpylib.PyFile.funcs.makefile(filename, restart=False, blank=True)[source]#
kitpylib.PyFile.funcs.rename(oldname, newname)[source]#