PInterrupt.gms : Test GamsJob interrupt mechanism in object oriented Python API

Description

Contributor: Clemens Westphal, June 2016


Small Model of Type : Python


Category : GAMS API library


Main file : PInterrupt.gms

$TITLE 'Test GamsJob interrupt mechanism in object oriented Python API' (PINTERRUPT,SEQ=54)

$ontext
Contributor: Clemens Westphal, June 2016
$offtext

$set srcRoot %gams.sysdir%apifiles%system.dirsep%Python%system.dirsep%
$                             set C ;
$if %system.filesys% == UNIX $set C :

$ifthen setenv PYTHON36
$  setEnv PYTHONPATH "%srcRoot%api_36%C%%srcRoot%gams"
$  call.checkErrorLevel cd . && "%sysenv.PYTHON36%" "%srcRoot%interrupt.py" "%gams.sysdir%." "-nonInteractive"
$endif
$ifthen setenv PYTHON37
$  setEnv PYTHONPATH "%srcRoot%api_37%C%%srcRoot%gams"
$  call.checkErrorLevel cd . && "%sysenv.PYTHON37%" "%srcRoot%interrupt.py" "%gams.sysdir%." "-nonInteractive"
$endif
$ifthen setenv PYTHON38
$  setEnv PYTHONPATH "%srcRoot%api_38%C%%srcRoot%gams"
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%srcRoot%interrupt.py" "%gams.sysdir%." "-nonInteractive"
$endif
$ifthen setenv PYTHON39
$  setEnv PYTHONPATH "%srcRoot%api_39%C%%srcRoot%gams"
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%srcRoot%interrupt.py" "%gams.sysdir%." "-nonInteractive"
$endif

$ifThen dExist "%gams.sysdir%GMSPython"
$  dropEnv PYTHONPATH
$  call.checkErrorLevel cd . && "%gams.sysdir%GMSPython%system.dirsep%python" "%srcRoot%interrupt.py" "%gams.sysdir%." "-nonInteractive"
$endIf