Page 1 of 1

shell/spawn command?

Posted: Tue May 17, 2016 7:02 am
by chester
I'd very new to EViews and I would like to know exactly how the 'shell' and 'spawn' commands work.
I would like EViews to run a python program that accesses a relational database software which will ultimately return queried data back to EViews.
Is this possible?

Thanks for any help. :lol:

Re: shell/spawn command?

Posted: Tue May 17, 2016 7:48 am
by EViews Gareth
They basically run DOS style batch program. The only way to feed data back to EViews using them is if the external application saves a data file to disk which can then be opened in EViews.

Re: shell/spawn command?

Posted: Tue May 17, 2016 12:05 pm
by chester
I am trying to use the 'spawn' command in order to call on a .py file which can be found in "C:\Users\me\Documents\personalfolder".
When I type in ' spawn "C:\Users\me\Documents\personalfolder" mypythonfile.py ' in the command line, it give me an error window that says "Unable to create process: Access is denied."
What could be the possible reason?

Re: shell/spawn command?

Posted: Tue May 17, 2016 12:19 pm
by EViews Gareth
Don't know enough about Python to tell. What happens if you run the identical command from a DOS/Command Prompt?

Re: shell/spawn command?

Posted: Sat May 28, 2016 7:47 am
by EViews Steve
I'm not sure if spawn works that way. For example if you spawn a txt file does notepad open? Instead, try spawning the python exe and pass the py file as a parameter. If you continue to have access is denied issues, try launching EViews with admin rights then try the command again.

Also have you seen the new Python EViews library that was released a while ago? It lets your Python program interact with EViews programmatically. Here's a link to the blog post discussing it. http://blog.eviews.com/2016/03/pyeviews ... s.html?m=1


Sent from my iPhone using Tapatalk