Stash Software API  2.0.0
Functions
sPythonUtils.utilitiesLib Namespace Reference

[ MODULE ] - Utilities. More...

Functions

def createPythonModule (path, name='__init__.py', content=None)
 Create a Python module with given name in given path. More...
 

Detailed Description

[ MODULE ] - Utilities.

Function Documentation

◆ createPythonModule()

def sPythonUtils.utilitiesLib.createPythonModule (   path,
  name = '__init__.py',
  content = None 
)

Create a Python module with given name in given path.

Parameters
path[ str | None | in ] - Absolute path where the Python module will be created in.
name[ str | None | in ] - Name of the Python module, which will be created.
content[ str | None | in ] - Content, which will be written into the file.
Exceptions
IOError- If path does not exist.
IOError- If a Python module with name in path already exists.
Returns
str - Absolute path of the created Python module.