shell/spawn command?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

chester
Posts: 44
Joined: Thu May 12, 2016 11:14 am

shell/spawn command?

Postby chester » Tue May 17, 2016 7:02 am

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:

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: shell/spawn command?

Postby EViews Gareth » Tue May 17, 2016 7:48 am

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.

chester
Posts: 44
Joined: Thu May 12, 2016 11:14 am

Re: shell/spawn command?

Postby chester » Tue May 17, 2016 12:05 pm

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: shell/spawn command?

Postby EViews Gareth » Tue May 17, 2016 12:19 pm

Don't know enough about Python to tell. What happens if you run the identical command from a DOS/Command Prompt?

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: shell/spawn command?

Postby EViews Steve » Sat May 28, 2016 7:47 am

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests