module win_installer.win_extract

Short summary

module pymyinstall.win_installer.win_extract

Helpers, inspired from utils.py

source on GitHub

Functions

function

truncated documentation

clean_msi

clean all files follwing a specific pattern

extract_archive

Extract .zip, .exe (considered to be a zip archive) or .tar.gz archive to a temporary directory (if targetdir is None). …

extract_copy

Copy .exe to targetdir

extract_exe

Extract .exe archive to a temporary directory (if targetdir is None). Return the temporary directory path

extract_msi

Extract .msi installer to a temporary directory (if targetdir is None). Return the temporary directory path

is_program_installed

Return program absolute path if installed in PATH Otherwise, return None

Documentation

Helpers, inspired from utils.py

source on GitHub

pymyinstall.win_installer.win_extract.clean_msi(folder, pattern, verbose=False, fLOG=<built-in function print>)[source]

clean all files follwing a specific pattern

Parameters
  • folder – folder

  • pattern – files to remove

  • verbose – display more information

  • fLOG – logging function

Returns

removed files (as operation)

source on GitHub

pymyinstall.win_installer.win_extract.extract_archive(fname, targetdir=None, verbose=False, fLOG=<built-in function print>)[source]

Extract .zip, .exe (considered to be a zip archive) or .tar.gz archive to a temporary directory (if targetdir is None). Return the temporary directory path

Parameters
  • fname – zip file or exe file

  • targetdir – where to install

  • verbose – verbose

  • fLOG – logging function

Returns

targetdir

source on GitHub

pymyinstall.win_installer.win_extract.extract_copy(fname, targetdir=None, verbose=False, fLOG=<built-in function print>, szip=None)[source]

Copy .exe to targetdir

Parameters
  • fname – local installer (exe)

  • targetdir – where to install

  • verbose – verbose

  • fLOG – logging function

  • szip – unused

Returns

targetdir

source on GitHub

pymyinstall.win_installer.win_extract.extract_exe(fname, targetdir=None, verbose=False, fLOG=<built-in function print>, szip='7z.exe')[source]

Extract .exe archive to a temporary directory (if targetdir is None). Return the temporary directory path

Parameters
  • fname – local installer (exe)

  • targetdir – where to install

  • verbose – verbose

  • szip – path to 7z.exe

  • fLOG – logging function

Returns

targetdir

source on GitHub

pymyinstall.win_installer.win_extract.extract_msi(fname, targetdir=None, verbose=False, fLOG=<built-in function print>)[source]

Extract .msi installer to a temporary directory (if targetdir is None). Return the temporary directory path

Parameters
  • fname – local installer (exe)

  • targetdir – where to install

  • verbose – verbose

  • fLOG – logging function

Returns

targetdir

source on GitHub

pymyinstall.win_installer.win_extract.is_program_installed(basename)[source]

Return program absolute path if installed in PATH Otherwise, return None

Parameters

basename – base name

Returns

boolean

source on GitHub