transonic.util¶
Internal utilities¶
Public API¶
Internal API¶
- transonic.util.find_module_name_from_path(path_py: Path)[source]¶
Find the module name from the path of a Python file
It is done by looking to
sys.path
to see how the module can be imported.
- transonic.util.has_to_build(output_file: Path, input_file: Path)[source]¶
Check if a file has to be (re)built
- transonic.util.get_source_without_decorator(func: Callable)[source]¶
Get the source of a function without its decorator
- transonic.util.get_info_from_ipython()[source]¶
Get the input code and a “filename” when called from IPython
- transonic.util.has_to_compile_at_import()[source]¶
Check if transonic has to pythranize at import time
- transonic.util.import_from_path(path: Path, module_name: str)[source]¶
Import a .py file or an extension from its path
- transonic.util.query_yes_no(question: str, default: str = None, force: bool = False)[source]¶
User yes or no query
- transonic.util.clear_cached_extensions(module_name: str, force: bool, backend: str)[source]¶
Delete the cached extensions related to a module
Functions
|
|
|
Delete the cached extensions related to a module |
|
Find the module name from the path of a Python file |
|
|
|
Return a frame object from the call stack. |
Get the input code and a "filename" when called from IPython |
|
|
Get the input code when called from IPython |
|
Get the full module name |
|
|
Get the source of a function without its decorator |
|
Check if transonic has to pythranize at import time |
|
|
Check if a file exists and contains a code |
|
Import a .py file or an extension from its path |
|
Determine wether a function is going to be used as a method |
|
|
|
|
|
User yes or no query |
|
Control the "compile_at_import" mode |
|
Strip the type hints from a function |
|
timeit with a approximate total_duration |
|
|
|
Write a file if it doesn't exist or doesn't contain a particular code |
Classes
Strip the type hints |