Skip to main content

TXTFile

Simple Python package for text file operations.

Install

pip install wixok.txtfile

Usage

from wixok.txtfile import TXTFile

# Read entire file content as a string
content = TXTFile.load("data.txt")
print(content)  # 'line 1\nline 2\nline 3\nline 4\n'

# Read file lines into a list
lines = TXTFile.load_lines("data.txt")
print(lines)  # ['line 1', 'line 2', 'line 3', 'line 4']

# Add a line to the file
success = TXTFile.add_line("data.txt", "line 5")
print(success)  # True

# Clear file contents
cleared = TXTFile.clear("data.txt")
print(cleared)  # True

Methods

Method Description Returns
load(path) Read entire file content as a single string str
load_lines(path) Read file lines into a list of strings list[str]
add_line(path, text) Append a line to the file (with newline) bool
clear(path) Empty the file bool

Debug Mode

TXTFile.debug = True  # Enable error messages

Metadata

Release files for wixok.txtfile 25.8.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 wixok.txtfile 25.8.3
File Size Uploaded
wixok_txtfile-25.8.3.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wixok.txtfile 25.8.3
File Interpreter ABI Platform
wixok_txtfile-25.8.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / wixok_txtfile-25.8.3.tar.gz

Download URL wixok_txtfile-25.8.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e47681b27687024be8e298a4f3fbef62b077a4af4220759360a77f6621503e51
BLAKE2b-256 checksum
How to use checksums
1d22c5b5876840ac4b23779fd9a3f356d7bb100850e53583460db2219440f839
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / wixok_txtfile-25.8.3-py3-none-any.whl

Download URL wixok_txtfile-25.8.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
feb9cf4032983394f0db5423c835918886d80fe25d7d7f6fdf3588c75c5bf23d
BLAKE2b-256 checksum
How to use checksums
844437cfe5a24d3778a74691569d951ba0f8e4e896ba4767178304be528ca20c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

25.8.3 This release

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