python_import, a Python code which demonstrates how a Python function can use the import function to access functions from a library that is in a separate directory.

In this example, the library defines various partial digest test problems. To use the function which defines a test problem, a simple import command would ordinarily be used. However, in our case, we must do some magic so that Python knows where to look for this information in a separate directory.


The computer code and data files made available on this web page are distributed under the MIT license.


python_import is available in a Python version.

Related Data and codes:

partial_digest, a Python code which solves the partial digest problem.

test_partial_digest, a Python code which generates example cases of the partial digest problem.

Source Code:

Last revised on 30 January 2024.