Alex Rivera | Logout

Combining module files in Python

Asked 2009-07-09T13:59:06.037
10

Is there a way to put together Python files, akin to JAR in Java? I need a way of packaging set of Python classes and functions, but unlike a standard module, I'd like it to be in one file.

Edit
Report

1 Answer

1

You can create zip files containing Python code and import from zip files using zipimport. A system such as PyInstaller (cross-platform) or py2exe (Windows) will do all this for you.

answered 2009-07-09T14:01:42.443

Your Answer