LTH-image
Anders Blomdell
Anders Blomdell
Research Engineer
anders.blomdell@control.lth.se
Phone: +46 46 222 46 25
Fax: +46 46 13 81 18

apa -- Anders Python Archiver

A very simple utility that takes a number of python files and puts them in a single executable python file.

Creating an archive is simple, just run: apa -o <archive name> <additional modules>*

Download code

In order to extract the original file(s), follow the following steps:

  • Add a .py suffix to the archive (if needed)
  • Start a python interpreter
  • Run the following commands:
    >>> import <archive name>
    >>> <archive name>.extract(<destination dir>)

This utility is inspired by Java's jar utility, but in apa only .py files can be archived, and they are stored in uncompressed text format.