CASP Python Libraries
This documentation primarily focuses on the usage of functions from 'casp', 'casp_be', 'casp_gpio' and 'casp_udio' namespaces.
Loading...
Searching...
No Matches
_casp_process.CaspProcess Class Reference

CaspProcess class provides interfaces to create, read/write and terminate 'CASP' executable as a subprocess. More...

Public Member Functions

 init (self, bool make_visible=False, str casp_file="CASP-Eval")
 Starts a python subprocess for 'CASP or CASP-Eval' executable with command line interface (CLI) enabled.
str write (self, str cmd, list[str] arguments=None)
 In general, data exchange betweem the python side interfaces and the executable is in the form of 'command' and a list of corresponding 'arguments'.
 close (self)
 Closes or terminates the subprocess and waits till subprocess is terminated before returning.

Detailed Description

CaspProcess class provides interfaces to create, read/write and terminate 'CASP' executable as a subprocess.

A global object of this class casp_proc is also created in this module. It is used by upper level interfaces from casp.py module.

Definition at line 20 of file _casp_process.py.

Member Function Documentation

◆ init()

_casp_process.CaspProcess.init ( self,
bool make_visible = False,
str casp_file = "CASP-Eval" )

Starts a python subprocess for 'CASP or CASP-Eval' executable with command line interface (CLI) enabled.

Arguments:

make_visible: allows the GUI window to be visible or hidden. Default is to hide the window.

casp_file: allows user to specify different version of CASP executable other than the evaluation version. In most cases this argument is not required to be specified by the user.

Definition at line 25 of file _casp_process.py.

◆ write()

str _casp_process.CaspProcess.write ( self,
str cmd,
list[str] arguments = None )

In general, data exchange betweem the python side interfaces and the executable is in the form of 'command' and a list of corresponding 'arguments'.

This interface writes the command along with its argument list to the subprocess. Waits for the response and returns the response received from the subprocess.

Arguments:

cmd: command string to write to the subprocess

arguments: argument list to write to the subprocess

Return Value:

Response string received from the subprocess

Definition at line 57 of file _casp_process.py.

◆ close()

_casp_process.CaspProcess.close ( self)

Closes or terminates the subprocess and waits till subprocess is terminated before returning.

Definition at line 85 of file _casp_process.py.


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