You want the built in __import__
function
new_module = __import__(modulename)
More Related Contents:
- How can I calculate a list modulo a numer in python?
- How to remove English words from a file containing Dari words?
- How can I read inputs as numbers?
- Zip lists in Python
- Why is a list comprehension so much faster than appending to a list?
- Why is parenthesis in print voluntary in Python 2.7?
- 2D list has weird behavor when trying to modify a single value [duplicate]
- python filter list of dictionaries based on key value
- Implement MATLAB’s im2col ‘sliding’ in Python
- How to convert a string to utf-8 in Python
- Selenium – MoveTargetOutOfBoundsException with Firefox
- What does an ‘r’ represent before a string in python? [duplicate]
- Pygame2Exe Errors that I can’t fix
- How to split dictionary into multiple dictionaries fast
- Reading a file with a specified delimiter for newline
- class method generates “TypeError: … got multiple values for keyword argument …”
- Connection Timeout with Elasticsearch
- How to locate and insert a value in a text box (input) using Python Selenium?
- Multiple keys per value
- flatten list of list through list comprehension
- Python Pandas – Read csv file containing multiple tables
- PyQt GUI order of operations
- Win32api is not giving the correct coordinates with GetCursorPos() in python
- Can’t install pygame on mac
- Why do I get “‘str’ object has no attribute ‘read'” when trying to use `json.load` on a string? [duplicate]
- Catching exception in context manager __enter__()
- confused about random_state in decision tree of scikit learn
- Is possible to mapping view with class using mapper in SqlAlchemy?
- Python 2.7 : LookupError: unknown encoding: cp65001 [duplicate]
- How to handle IncompleteRead: in python