umpypkg | index c:\umetri\simca\simca16_0\sln\output\simcax64\debugexe\umpy\internal.zip\umpypkg.py

Modules
`` |  |
os | sys | umpypkg |

Classes
`` |  | builtins.Exception(builtins.BaseException) InvalidVenv NoVenv builtins.object UmPyVenv
class InvalidVenv(builtins.Exception)
`` | `InvalidVenv(value) Raised when there is an environment but it is in some way invalid`
| Method resolution order: InvalidVenv builtins.Exception builtins.BaseException builtins.object Methods defined here: __init__(self, value) `Initialize self. See help(type(self)) for accurate signature.` __str__(self) `Return str(self).` Data descriptors defined here: __weakref__ `list of weak references to the object (if defined)` Static methods inherited from builtins.Exception: __new__(*args, **kwargs) from builtins.type `Create and return a new object. See help(type) for accurate signature.` Methods inherited from builtins.BaseException: __delattr__(self, name, /) `Implement delattr(self, name).` __getattribute__(self, name, /) `Return getattr(self, name).` __reduce__(...) `Helper for pickle.` __repr__(self, /) `Return repr(self).` __setattr__(self, name, value, /) `Implement setattr(self, name, value).` __setstate__(...) with_traceback(...) `Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.` Data descriptors inherited from builtins.BaseException: __cause__ `exception cause` __context__ `exception context` __dict__ __suppress_context__ __traceback__ args
class NoVenv(builtins.Exception)
`` | `NoVenv(value) Raised when there is no environment and it is possible to create one`
| Method resolution order: NoVenv builtins.Exception builtins.BaseException builtins.object Methods defined here: __init__(self, value) `Initialize self. See help(type(self)) for accurate signature.` __str__(self) `Return str(self).` Data descriptors defined here: __weakref__ `list of weak references to the object (if defined)` Static methods inherited from builtins.Exception: __new__(*args, **kwargs) from builtins.type `Create and return a new object. See help(type) for accurate signature.` Methods inherited from builtins.BaseException: __delattr__(self, name, /) `Implement delattr(self, name).` __getattribute__(self, name, /) `Return getattr(self, name).` __reduce__(...) `Helper for pickle.` __repr__(self, /) `Return repr(self).` __setattr__(self, name, value, /) `Implement setattr(self, name, value).` __setstate__(...) with_traceback(...) `Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.` Data descriptors inherited from builtins.BaseException: __cause__ `exception cause` __context__ `exception context` __dict__ __suppress_context__ __traceback__ args
class UmPyVenv(builtins.object)
`` | `UmPyVenv(env_dir, base) Handle the Python Virtual Environment`
| Methods defined here: __init__(self, env_dir, base) `Initialize self. See help(type(self)) for accurate signature.` __repr__(self) `Return repr(self).` __str__(self) `Return str(self).` install(self, pkg, from_path=None) `Install packages from https://pypi.org or local disk pkg - The package to install from_path - The directory where to look for 'pkg'. Note that any dependencies to 'pkg' also needs to be in the same directory.` list(self) python_version(self, do_print=True) show(self, pkg) uninstall(self, pkg) upgrade(self, pkg) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Functions
`` |  | create(env='default') `Create and activate a new venv. Packages installed will be located here. env - The name of the virtual env. This is the folder name under %AppData%\Umetrics\SIMCA\16.0\Python\envs` current() `Returns the name of the current venv or None if none has been created.` delete(env) freeze() `Returns a list of the packages and verion numbers installed in the active environment. This list can be used with restore() to restore a virtual environment.` init(env='default') `Initialize an already created venv. env - The name of the virtual env. This is the folder name under %AppData%\Umetrics\SIMCA\16.0\Python\envs` install(pkg, from_path=None) `Install packages from https://pypi.org or local disk pkg - The package to install from_path - The directory where to look for 'pkg'. Note that any dependencies to 'pkg' also needs to be in the same directory.` latest_version(package) `Returns the latest version of the specified package.` list() `List installed packages in the active venv` list_envs() `Returns a list of virtual environments` restore(environment_spec) `Restores the packages and versions in the currently active virtual environment specified in environment_spec. environment_spec can either be a string containing an environment specification that 'pip install -r' understands (see documentation for pip) or the name of a file that contains the specification. The string returned by freeze() can be used with restore.` show(pkg) `Returns information about pkg in the active venv` uninstall(pkg) `Uninstall pkg from the active venv` upgrade(pkg) `Upgrade pkg in the active venv` vscode() `Creates a .vscode directory in the active venv with settings.json and a launch.json for easy integration with VS Code and debugging using the ptvsd package. In VS Code open the venv as folder to use these settings. VS Code needs the Python extension from Microsoft. SIMCA needs the package 'ptvsd', install it with umpypkg.install('ptvsd') with this venv active. In VS Code click the cogwheel at the bottom left and start typing 'python: Run Selection/Line in Python terminal' and execute the command when selectable. You should see 'Python 3.7.1 64-bit ('default': venv)' in the blue bar at the bottom. Open a file you want to debug in VS Code, it needs to be on the path in the SIMCA Console. Click the editor side by the line numbers to set a breakpoint somewhere. Open the debug mode in VS Code (ctrl+shift+D) In SIMCA >>> import ptvsd >>> ptvsd.enable_attach() >>> ptvsd.wait_for_attach(30) # this will block until you attach with VS Code, or 30 seconds pass In Code select 'Python: Attach' by the green play-icon and press said play-icon. The ptvsd.wait_for_attach() call in SIMCA should return and a small box with debug controls appear in Code Run the script you set a breakpoint in. VS Code should be focused and the line with the breakpoint selected.`

Data
`` |  | base_dir = r'C:\Umetri\SIMCA\simca16_0\sln\output\SIMCAx64\DebugExe\UmPy' env = UmPyVenv.env: fkl env_dir = r'C:\Users\JoakimS\AppData\Roaming\Umetrics\SIMCA\16.0\Python\envs\fkl' lib_dir = r'C:\Users\JoakimS\AppData\Roaming\Umetrics\SIMCA\16.0\Python' paths = [r'C:\Users\JoakimS\AppData\Roaming\Umetrics\SIMCA\16.0\Python', r'C:\Umetri\Libs\NC\Main\python_unittests\tests', r'C:\Umetri\Documents\SIMCA\[Common]\scripting\validationscripts'] reentry_guard = False