pythonsasjupytersaspy

Open SAS from within Jupyter


From within Jupyter, can you make a call to open external software, eg SAS? I have SASpy and SAS. Both work fine. But I want to streamline the process of using SASpy. So, instead of manually opening SAS first, is there a way to insert a command that will result in the software opening?

I have no idea how to go about this. I'm a noob with Python.


Solution

  • With SASPy or the SAS Kernel you're able to run SAS programs from within Jupyter, so I'm unsure of why you'd want to do this. If you want to programmatically open up SAS 9.4, you can open up any executable in Python with subprocess.run().

    import subprocess 
    

    To open SAS Enterprise Guide on Windows:

    subprocess.run('C:\\SASHome\\SASEnterpriseGuide\\8\\SEGuide.exe')
    

    To open sas.exe on Windows:

    subprocess.run('C:\\SASHome\\SASFoundation\\9.4\\sas.exe')