SModelS / smodels

SModelS
https://smodels.github.io
14 stars 5 forks source link

passing TIMEOUT argument while calling SModelS from python #35

Closed wkotlarski closed 1 year ago

wkotlarski commented 1 year ago

Dear Authors,

The command line interface has a TIMEOUT argument. Is there a way to achieve the same behavior when calling SModelS from python? My call routines are basically a copy of what is given in Example.py. There doesn't seem to be a place to pass TIMEOUT there.

Best, Wojciech

WolfgangWaltenberger commented 1 year ago

Hey Wojciech,

yes, in principle the following snippet should do the trick: ... from smodels.tools import crashReport, timeOut ... try: with timeOut.Timeout(timeout):

except Exception as e: crashReportFacility = crashReport.CrashReport() Hope it helps. Cheers Wolfgang On Fri, Nov 3, 2023 at 12:50 PM Wojciech Kotlarski ***@***.***> wrote: > Dear Authors, > > The command line interface has a TIMEOUT argument. Is there a way to > achieve the same behavior when calling SModelS from python? My call > routines are basically a copy of what is given in Example.py. There > doesn't seem to be a place to pass TIMEOUT there. > > Best, > Wojciech > > — > Reply to this email directly, view it on GitHub > , or unsubscribe > > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
wkotlarski commented 1 year ago

Hi Wolfgang. That solves my problem. Thanks for the tip.

Best, Wojciech