Written by Samuel Evans.
Questions, comments, or interested in contributing? Email sevans7@bu.edu .
This repository is intended to provide quality-of-life improvements when coding in python.
See also the PythonQOL Wiki. (Click the link or the Wiki tab on github.)
- QOL.plots: plotting (mainly matplotlib.pyplot)
- QOL.files: storage (mainly h5py)
- QOL.codes: other miscellaneous QOL code
cd Dir
git clone https://github.com/Sevans711/PythonQOL/
(Replace Dir with the directory you want this folder to go in.
This command will create a folder Dir/PythonQOL and then put the repository contents in that folder.
One example is: cd /Users/YourUserName/Desktop)
cd PythonQOL
pip install -e .
This has the benefit of being relatively simple, and also if you ever want to uninstall you can just type pip uninstall QOL.
If you have no intentions of ever editting this code, you can drop the -e part and just do pip install .. Explanation:
The -e flag puts your installation in development mode, as per python setup.py develop. Basically, "development mode" means that if you make your own changes to this package, the changes will apply the next time you import QOL. Without development mode, you need to pip install the editted package every time you make edits in order for them to take effect.
Add the PythonQOL folder (if you're following these steps, it will be at the location Dir/PythonQOL) to your PYTHONPATH. (The PATH tells python where it's allowed to search for File when you type "import File".)
As an example of how to do this: I use Spyder, so in the top left of my screen when spyder is open, I can click python > PYTHONPATH manager, then +Add Path. For other python consoles you may need to determine separately how to edit your PATH variable.
Troubleshooting: try relaunching your python shell/compiler after you have done the installation steps above.
Once you've completed choice 1 or choice 2 above, run this code to get started:
import QOL.files as fqol
import QOL.plots as pqol
import QOL.codes as cqol- Check out the PythonQOL Wiki. (Click the link or the Wiki tab on github.)
- Use
help(obj)to read the documentation inside the code. For example:help(pqol)will print info about all the functions insidePlotQOL(once you have doneimport PlotQOL as pqol).help(pqol.hline)will info about thehline()function fromPlotQOL.
You may need to install h5py to run FileQOL.
For that I direct you to http://docs.h5py.org/en/stable/build.html#
(TODO: add dependencies appropriately to setup.py so they are installed automagically)
Roughly, feel free to use/distribute/alter the code and any results from it as you see fit.
Officially, see the Liscense Page