Cache lines and information of files which are often Python programs
Project description
A - pyficache module to read and cache information about a Python program.
SYNOPSIS
The pyficache module allows one to get any line from any file, caching
lines of the file on first access to the file. Although the file may
be any file, the common use is when the file is a Python script since
parsing of the file is done to figure out where the statement
boundaries are.
The routines here may be is useful when a small random sets of lines
are read from a single file, in particular in a debugger to show
source lines.
Summary
import pyficache
lines = pyficache.getlines('/tmp/myprogram.py')
line = pyficache.getline('/tmp/myprogram.py', 6)
# Note lines[6] == line if /tmp/myprogram.py has more 6 or more lines
pyficache.clear_file_cache()
pyficache.clear_file_cache('/tmp/myprogram.py')
pyficache.update_cache() # Check for modifications of all cached files.
Credits
This is a port of the my Ruby linecache module which in turn is
based on the Python linecache module. So in a sense this is decorator
and extension of that.
coverage.py provides the cool stuff to figure out lines where there
statements.
Other stuff
Author:: Rocky Bernstein <rockyb@rubyforge.net>
License:: Copyright (c) 2009 Rocky Bernstein
Released under the GNU GPL 3 license
0.1.4 10-28-10
- Correct packaging
0.1.3 03-15-09 -
- incorrect "Provide" in setup.cfg
0.1.2 03-15-09 - Ron Frankel Release
- Bug in searching for files
0.1.0 03-08-09 - Ron Frankel -1 Release
- Initial release
SYNOPSIS
The pyficache module allows one to get any line from any file, caching
lines of the file on first access to the file. Although the file may
be any file, the common use is when the file is a Python script since
parsing of the file is done to figure out where the statement
boundaries are.
The routines here may be is useful when a small random sets of lines
are read from a single file, in particular in a debugger to show
source lines.
Summary
import pyficache
lines = pyficache.getlines('/tmp/myprogram.py')
line = pyficache.getline('/tmp/myprogram.py', 6)
# Note lines[6] == line if /tmp/myprogram.py has more 6 or more lines
pyficache.clear_file_cache()
pyficache.clear_file_cache('/tmp/myprogram.py')
pyficache.update_cache() # Check for modifications of all cached files.
Credits
This is a port of the my Ruby linecache module which in turn is
based on the Python linecache module. So in a sense this is decorator
and extension of that.
coverage.py provides the cool stuff to figure out lines where there
statements.
Other stuff
Author:: Rocky Bernstein <rockyb@rubyforge.net>
License:: Copyright (c) 2009 Rocky Bernstein
Released under the GNU GPL 3 license
0.1.4 10-28-10
- Correct packaging
0.1.3 03-15-09 -
- incorrect "Provide" in setup.cfg
0.1.2 03-15-09 - Ron Frankel Release
- Bug in searching for files
0.1.0 03-08-09 - Ron Frankel -1 Release
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyficache-0.1.4.tar.gz
(21.2 kB
view details)
Built Distribution
pyficache-0.1.4-py2.6.egg
(9.2 kB
view details)
File details
Details for the file pyficache-0.1.4.tar.gz
.
File metadata
- Download URL: pyficache-0.1.4.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f12ee33304a7155e7371a9adeb174ff4938b810c8a1f86189eaf34373a1859c6 |
|
MD5 | 7f76647f16d64745b23560b10ae8b5a3 |
|
BLAKE2b-256 | 6a26f4755fea151854916704965f834f23e39c9f1e0f2f3d819175d12a21c1b9 |
Provenance
File details
Details for the file pyficache-0.1.4-py2.6.egg
.
File metadata
- Download URL: pyficache-0.1.4-py2.6.egg
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804f61787531213e90256beadce1c468d5fe003531fc300ca8c060f5382c2410 |
|
MD5 | 2272be184230c51ab50e5e6ce1c8afd0 |
|
BLAKE2b-256 | fb1b5053ee838ca6abc3e92c9211dd31101349885543912d7cec59bafebc6b0e |