-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerslowLow priorityLow priority
Description
Replace the packaging module, which is only used for parsing version specifications, with a local implementation to simplify the installation process.
importlib was added to Python 3 to programmatically >import a module.
import importlib moduleName = input('Enter module name:') importlib.import_module(moduleName)The .py extension should be removed from moduleName. The function also defines a package argument for relative imports.
In python 2.x:
Just import file without the .py extension
A folder can be marked as a package, by adding an empty init.py file
You can use the import function, which takes the module name (without extension) as a string extensionpmName = input('Enter module name:') pm = __import__(pmName) print(dir(pm))Type help(import) for more details.
https://stackoverflow.com/a/2349998
Depends on: #17
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerslowLow priorityLow priority