calling matlab

Robert Kern robert.kern at gmail.com
Wed Oct 12 17:44:15 CEST 2005


Mohammed Smadi wrote:
> Hi;
> 
> Does anyone know if we can call matlab for a python or bash script while 
> feeding the matlab script some command line arguments?  I have an 
> interactive matlab script which i want to automate by feeding the args 
> from a script.

Depending on how interactive it is, you should look at the subprocess
module in the stdlib or pexpect.

  http://docs.python.org/lib/module-subprocess.html
  http://pexpect.sourceforge.net/

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list