uniphy

Unification and collection of algorithms used in physics


Keywords
physics, analysis, algorithm
License
LGPL-3.0
Install
pip install uniphy==0.0.4.dev0

Documentation

PyPI version Build Status Code Health Dependency Status

uniphy

Uniphy stands for "University Physics". The package focuses on specialised functionality for research and teaching on university level without a focus on a certain branch of physics or science. It is part of the Phynix project.

Current projects

The package is still in its early stage of planning and first implementations. It is currently not usable for any production-like application.

Output

What if "print" would simply save everything also into a file if I want to and not if I don't want to? Or if only those "prints" will be saved which I want to be saved?

The answer is Output which does exactly the above (and more). But most of all, it does not change anything if not wanted.

Simply replace every print with out.print. And everything works as usual. One line will let you save the output. If you like. And won't if you don't.

Minimal example:

import uniphy as up

out = up.output()
out.print("Same as print", "\nBut I can be saved as well.")

OR

out = up.output("/my/path/to/folder")
out.print("Same as print again, but will be saved this time")