Skip to main content

k3cat

Action-CI Documentation Status Package

Just like nix command cat or tail, it continuously scan a file line by line.

k3cat is a component of pykit3 project: a python3 toolkit set.

Just like nix command cat or tail, it continuously scan a file line by line.

It provides with two way for user to handle lines: as a generator or specifying a handler function.

It also remembers the offset of the last scanning in a file in /tmp/. If a file does not change(inode number does not change), it scans from the last offset, or it scan from the first byte.

Install

pip install k3cat

Synopsis

import sys

import k3cat

fn = sys.argv[1]
for x in k3cat.Cat(fn, strip=True).iterate(timeout=0):
    print(x)

Author

Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Metadata

Release files for k3cat 0.1.4

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

Source distribution (sdist)

Source distribution for k3cat 0.1.4
File Size Uploaded
k3cat-0.1.4.tar.gz 10.7 kB Details

Built distribution (wheel)

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

Total release size: 19.2 kB

Release files / k3cat-0.1.4.tar.gz

Download URL k3cat-0.1.4.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
50b1a38fcd2c06e75cb7cc7b5f0c8b3f6028110c0ee5afad5b3cd13070155248
BLAKE2b-256 checksum
How to use checksums
afc050720f1d1ce05ae7f40d0f2b5a1dca216520edcc9f610a54fd973f8c8302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / k3cat-0.1.4-py3-none-any.whl

Download URL k3cat-0.1.4-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d353670320b4807303f8179c7f62a40c21cb1d5aa1dbb2361c5e5f175169e316
BLAKE2b-256 checksum
How to use checksums
6f49175f332c82a62f8bbc95152281c059079e16bee79e388fff9e191d20a3ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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