Skip to content

Sevans711/PythonQOL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PythonQOL

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.)

CONTENTS:

GETTING STARTED:

To copy this repository to your computer do (in terminal / command line):

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)

To "install" the files:

Choice 1 - "pip install" method. (Recommended)

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.

Choice 2 - "pythonpath" method.

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.

To start using the files:

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

To learn what's inside the files, here are some options:

  • 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 inside PlotQOL (once you have done import PlotQOL as pqol).
    • help(pqol.hline) will info about the hline() function from PlotQOL.

DEPENDENCIES:

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)

DISTRIBUTION:

Roughly, feel free to use/distribute/alter the code and any results from it as you see fit.
Officially, see the Liscense Page

About

Quality of Life functions for python. Includes plotting (mainly matplotlib.pyplot), storage (mainly h5py), and other miscellaneous QOL code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages