pyperl provides a perl implementation for python, but honestly, this is not the way I would go. Roboto's second suggestion is to write a script that runs NCleaner (either processes from stdin to stdout, or works on temporary files, whichever is more appropriate), and runs it as a subprocess.
Or, since I see on the NCleaner page that it has a C implementation, use whatever means Python has to bind to the C code, and write a Python module that completes the implementation of NCleaner C. Then in the future, answer the NCleaner call from Python will just be "here, use this module."
Footnote: Inline :: Python is better code than pyperl, and I would suggest using it instead, but it only supports that Python accesses Perl when Python is called with Perl in the first place - the ability to embed Perl in Python is specified as possible future function, but it has been so since 2001, so do not hold your breath.
hobbs
source share