Page 1 of 1

pyeviews

Posted: Fri Dec 13, 2024 11:36 am
by amrsherif
Hello,

I fixed my original problem, so I've adjusted my question accordingly.

I am trying to fetch series from an EViews database into python using pyeviews. It seems like I need to include the full path to the database. Is there a way that pyeviews can use my database registry, so as to avoid that?

Re: pyeviews

Posted: Fri Dec 13, 2024 9:02 pm
by EViews Steve
It would help to see what you're currently doing to understand the details better.

But if you're trying to fetch data from an EViews database, I would actually call FETCH first (with the alias name) which will pull the data into a new untitled workfile, and then get the data from the workfile using GetWFAsPython, like this:

Code: Select all

import py2eviews as evp eviewsapp = evp.GetEViewsApp(instance='new', showwindow=True) #show the EViews window for debugging... eviewsapp.Run('fetch(d=dbalias) x') #fetches X into new untitled workfile x = evp.GetWFAsPython(app=eviewsapp, namefilter='X') print(x) eviewsapp.Hide() #hide the window
FYI, pyeviews was recently renamed to py2eviews, which is what I'm using here. All new updates will be made to py2eviews.

Steve

Re: pyeviews

Posted: Sun Dec 15, 2024 9:43 am
by amrsherif
This works.

Thank you