def get_root_modules():
ip = get_ipython()<EOL>if '<STR_LIT>' in ip.db:<EOL><INDENT>return ip.db['<STR_LIT>']<EOL><DEDENT>t = time()<EOL>store = False<EOL>modules = list(sys.builtin_module_names)<EOL>for path in sys.path:<EOL><INDENT>modules += module_list(path)<EOL>if time() - t >= TIMEOUT_STORAGE and not store:<EOL><INDENT>store = True<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>sys.stdout.flush()<EOL><DEDENT>if time() - t > TIMEOUT_GIVEUP:<EOL><INDENT>print("<STR_LIT>")<EOL>ip.db['<STR_LIT>'] = []<EOL>return []<EOL><DEDENT><DEDENT>modules = set(modules)<EOL>if '<STR_LIT>' in modules:<EOL><INDENT>modules.remove('<STR_LIT>')<EOL><DEDENT>modules = list(modules)<EOL>if store:<EOL><INDENT>ip.db['<STR_LIT>'] = modules<EOL><DEDENT>return modules<EOL>
Returns a list containing the names of all the modules available in the
folders of the pythonpath.