Page 1 of 1

"close" command in pyeviews

Posted: Tue Aug 27, 2019 9:51 am
by hasan1
I am unable to pass the "close" command from pyeviews to Eviews. Bunch of other commands work smoothly.


import pyeviews as evp
eviewsapp = evp.GetEViewsApp(version='EViews.Manager.11', instance='new',showwindow=True)

evp.PutPythonAsWF(varlist, app=eviewsapp) #this works

evp.Run('run program.prg', app=eviewsapp) #this works

evp.Run('close program.prg', app=eviewsapp) #this does not work

evp.Run('close @prg', app=eviewsapp) #this does not work

evp.Run('wfsave(2) Model', app=eviewsapp) #this works

Re: "close" command in pyeviews

Posted: Tue Aug 27, 2019 10:05 am
by EViews Steve
I used a small test program like this one:

Code: Select all

wfcreate a 1991 2000
series x = rnd
series y = rnd

Then did the following in python using pyeviews:

Code: Select all

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyeviews as evp
>>> eviewsapp = evp.GetEViewsApp(version='EViews.Manager.11', instance='new', showwindow=True)
>>> evp.Run('run test.prg', app=eviewsapp)
>>> evp.Run('close test.prg', app=eviewsapp)

And the test program window closed just fine in my EViews 11.

Can you try this on your setup to see if it works?

Re: "close" command in pyeviews

Posted: Tue Aug 27, 2019 10:07 am
by EViews Steve
Also, make sure you have the latest EViews 11 patch installed.