MECO™ API Reference
Public Member Functions | List of all members
mMeco.mecoLib.Meco Class Reference

[ CLASS ] - Meco. More...

Inheritance diagram for mMeco.mecoLib.Meco:

Public Member Functions

def __init__ (self, parameters=None)
 Constructor. More...
 
def allLib (self)
 Property. More...
 
def setPowerShellExecutablePath (self, path)
 Set Powershell executable path. More...
 
def execute (self)
 Execute. More...
 
def executeCommand (self, commands, cwd=None)
 Execute given command in resolved environment. More...
 
def writeFile (self)
 Execute and return the path of the script file. More...
 

Detailed Description

[ CLASS ] - Meco.

Constructor & Destructor Documentation

◆ __init__()

def mMeco.mecoLib.Meco.__init__ (   self,
  parameters = None 
)

Constructor.

Parameters
parameters[ str | None | in ] - Parameters.
Exceptions
N/A
Returns
None - None.

Member Function Documentation

◆ allLib()

def mMeco.mecoLib.Meco.allLib (   self)

Property.

Exceptions
N/A
Returns
mMeco.libs.allLib.All - Value.

◆ setPowerShellExecutablePath()

def mMeco.mecoLib.Meco.setPowerShellExecutablePath (   self,
  path 
)

Set Powershell executable path.

Parameters
path[ str | None | in ] - Absolute path of Powershell executable.
Exceptions
N/A
Returns
bool - Result.

◆ execute()

def mMeco.mecoLib.Meco.execute (   self)

Execute.

  • Parse the request
  • Initialize.
  • Solve.
  • Build.
  • Respond.
Exceptions
N/A
Returns
None - None.

◆ executeCommand()

def mMeco.mecoLib.Meco.executeCommand (   self,
  commands,
  cwd = None 
)

Execute given command in resolved environment.

Method adds --set-only flag to the request and invokes mMeco.mecoLib.Meco.execute method first. Then given commands is executed in the resolved environment via subprocess.Popen.

Parameters
commands[ str, list of str | None | in ] - Commands to be executed (; separated).
cwd[ str | None | in ] - Current working directory for subprocess.Popen.
Exceptions
IOError- If PowerShell executable path doesn't exist on Windows OS .
Returns
tuple - stdout and stderr.

◆ writeFile()

def mMeco.mecoLib.Meco.writeFile (   self)

Execute and return the path of the script file.

Exceptions
N/A
Returns
str - Absolute path of the script file.
None - If a problem occurs during execution.

The documentation for this class was generated from the following file: