import a module in the Python environment
string or sequence of strings
The ImportModule command is used to import modules in the Python environment.
When package is a simple name, ImportModule(package) is equivalent to EvalString("import package",'output'='none').
When package already contains the string "import", usually as part of a more complicated import directive, then ImportModule(cmd) is the same as EvalString(cmd,output=none).
This function is part of the Python package, so it can be used in the short form ImportModule(..) only after executing the command with(Python). However, it can always be accessed through the long form of the command by using Python[ImportModule](..).
ImportModule⁡math as M
ImportModule⁡from bs4 import BeautifulSoup
The Python[ImportModule] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
Download Help Document