Skip to main content

Get modules name from your python code

Project description

modules-name-from-code

Get modules name from your python code

Example

/home/mycode.py :

import module1
import module2, module3
from module4 import module 

...
import getmodules.get_modules

print(get_modules("/home/mycode.py"))

Result :

['module2', 'module1', 'module4', 'module3']

Or

import getmodules.get_modules

print(get_modules("/home/mycode.py", sort=True))

Result :

['module1', 'module2', 'module3', 'module4']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modules-name-from-code-1.0.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

modules_name_from_code-1.0.0-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page