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
"close" command in pyeviews
Moderators: EViews Gareth, EViews Moderator
-
- EViews Developer
- Posts: 798
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: "close" command in pyeviews
I used a small test program like this one:
Then did the following in python using pyeviews:
And the test program window closed just fine in my EViews 11.
Can you try this on your setup to see if it works?
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?
-
- EViews Developer
- Posts: 798
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: "close" command in pyeviews
Also, make sure you have the latest EViews 11 patch installed.
Who is online
Users browsing this forum: No registered users and 8 guests