This is a simple library to find the recursive import link of source code
Project description
Python Find imported Module
pip3 install findimport
Example:
findownimportfile
if the source file in /mnt/c/workspace/example/source_code.py
Input:
python3 -m findimport --source source_code.py --path /mnt/c/workspace/ or /mnt/c/workspace/example
Output:
/mnt/c/workspace/example/own_import_find.txt
Input:
python3 -m findimport --source source_code.py --path /mnt/c/workspace/ or /mnt/c/workspace/example --save_text /mnt/c/workspace/imported_file.txt
Ouput:
/mnt/c/workspace/imported_file.txt
$ python3.7
import findimport import_list = findimport.find_own_import(source,path) print(import_list) ['/mnt/c/workspace/example/other_code.py',...]
findownimportfile
python3 -m findimport --source source_code.py --path 'dummystring' --find_all_import
S$ python3.7
import findimport import_list = findimport.find_all_import(source)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for findimport-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a625dabd8f73157ed8396e7490fac37f2ee36b83c9e62d20abafe81a2f6998b3 |
|
MD5 | e5ad44536b7ba9b809516cafed1e746e |
|
BLAKE2b-256 | aa2975df486e1518e97efe0265c2daad984223c2636d1d4fc06f197eae67fdf8 |