Import of other python macros

When writing macro code in python, is it possible to import functions from other .py-files with an import statement?

For example when creating a file functions.py and a file sample.py, inside a document (in Scripts/python/ directory inside the zipped ducument), can the files refer to each other?

Especially for embedded scripts I recommend for put everything in one file OR use a: Scripts/python/pythonpath sub-folder for modules which should be importable.

The answer is Yes
Please read Importing an embedded Python module

unfortunately, the author has forgotten to import the most important »import«:

import zipimport

Thx for your observation. I’ll make sure this is corrected

Actually I was refering more to a simple “import”-statement in python.
It kinda diminishes the use of putting shared functions in a submodule, if I need to write a separate function for importing them (which obviously needs to be defined in each of the files, that want to import the library.