+python-utils is a loose set of modules and packages, that can be easily
+dropped into any Python project. They are usually small (code to read),
+easy to use and limited in the functionality, they provide.
+There is nothing to install. Just copy the files, you want to use, into
+All code within this project is given to the public domain. There are no
+licensing restrictions. Please see *COPYING.txt* for further details.
hierarchy as it is, so that you put your unittest files into test/ and keep
all the framework files in test/util. ::
-You just need to stick to a single naming rule for files, which have to end
-with ``_test.py``. This can be changed in the `gettestfiles()` function in the
+You just need to stick to a single naming rule for files, which have to
+end with ``_test.py``. This can be changed in the `gettestfiles()`
+function in the *runtests.py* file.
The whole test suite can be executed with a simple module execution ::
python -m awesomepackage.test.util.runtests
-A simple ctypes wrapper class for loading shared libraries.
+A simple ctypes wrapper class for loading shared libraries.
save the user some disk space, you can use the ZIP or TAR compression to bundle
them into one or more single files.
-Let's assume your application features something like the following layout:
+Let's assume your application features something like the following
- [textfile1.txt, textfile2.txt]
+ [textfile1.txt, textfile2.txt]
Within Application.exe (which previously might have been application.py,
compiled and packaged via py2exe or something similar), you can define
apppath = os.path.dirname(os.path.abspath(__file__))
appresources = Resources(os.path.join(apppath, "resources"))
and access your data files like ::
- button_image = appresources.get("button.png")
+ button_image = appresources.get("button.png")
info_file = appresources.get("info.dat")
# Get textfile1.txt from textcontent.zip
textfile1 = appresources.get("textfile1.txt")