Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2@file 

3@brief Shortuts 

4""" 

5from .install_cmd_helper import run_cmd, update_pip, has_pip, add_shortcut_to_desktop_for_module, get_pip_program 

6from .install_venv_helper import run_cmd_path, run_venv_script, venv_install, create_virtual_env 

7from .module_install import ModuleInstall 

8from .module_dependencies import missing_dependencies 

9from .module_install_version import get_module_dependencies, get_module_version, get_pypi_version, get_module_metadata 

10from .module_install_version import version_consensus, numeric_version, compare_version, is_installed, get_wheel_version 

11from .status_helper import get_installed_modules 

12 

13 

14def module_as_table(list_module, as_df=False): 

15 """ 

16 Returns a list of dictionaries or a dataframe 

17 for a list of modules. 

18 

19 @param list_module list of @see cl ModuleInstall 

20 @param as_df as a dataframe or not 

21 @return list of dictionaries or dataframe 

22 """ 

23 res = [_.as_dict() for _ in list_module] 

24 if as_df: 

25 import pandas 

26 return pandas.DataFrame(res) 

27 else: 

28 return res