An module written with pure Python C Extensions to open a file and cache the more recent accessed lines
Project description
Fast File Package
An module written with pure Python C Extensions to open a file and cache the more recent accessed lines. See these files for an usage example:
Installation
Requires Python 3, pip3, distutils and C++ 11 compiler installed:
sudo apt-get install build-essential g++ python3-dev
Then, you can clone this repository with:
git clone https://github.com/evandrocoan/fastfilepackage
cd fastfilepackage
pip3 install .
Or install it with:
pip3 install fastfilepackage
Debugging
If Python got segmentation fault, you need to install the debug symbol packages, and compile the program into mode debug. These instructions works for both Linux and Cygwin.
sudo apt-get install python3-dbg
apt-cyg install libcrypt-devel python36-devel python36-debuginfo python3-debuginfo python3-cython-debuginfo
CFLAGS="-O0 -g -ggdb -fstack-protector-all" CXXFLAGS="-O0 -g -ggdb -fstack-protector-all" /bin/pip3 install .
cd khompdiag/source
gdb --args /bin/python3 -m khompdiag.__init__ -p ../tests/light/
python3 -m pdb -m khompdiag.__init__ -p ../tests/light/
cd /usr/bin
/bin/python3 -u -m trace -t khompdiag-script.py -p ../tests/light/
# to generate core dumps instead of stack traces
export CYGWIN="$CYGWIN error_start=dumper -d %1 %2"
- https://github.com/spiside/pdb-tutorial
- https://docs.python.org/3.7/library/pdb.html
- https://docs.python.org/3.7/library/trace.html
- https://stackoverflow.com/questions/320001/using-a-stackdump-from-cygwin-executable
- https://stackoverflow.com/questions/1629685/when-and-how-to-use-gccs-stack-protection-feature
- https://stackoverflow.com/questions/25678978/how-to-debug-python-script-that-is-crashing-python
- https://stackoverflow.com/questions/46265835/how-to-debug-a-python-module-run-with-python-m-from-the-command-line
License
See the file LICENSE.txt
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
fastfilepackage-1.0.13.tar.gz
(14.3 kB
view hashes)