469,309 Members | 2,783 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,309 developers. It's quick & easy.

Calling a matlab gui from python using pymatlab without allowing python to close it

Before proceeding further, my system configuration is as follows:
Mac OS X 10.6.6
MATLAB 2010b
ActiveState Python 2.7

I have a gui built using matlab. I wrote the following python script
to open that matlab gui using pymatlab python module:

Expand|Select|Wrap|Line Numbers
  1. from pymatlab.matlab import MatlabSession 
  2. session = MatlabSession() 
  3. session.run('cd ~/ratter/ExperPort') 
  4. session.run('addpath(genpath(pwd))') 
  5. session.run('run Utility/WaterMeister/WaterMeister.m') 
In the above python code, WaterMesiter.m is the matlab gui script. If
I run this in matlab shell, it opens the gui fine and I do whatever I
need to do with the gui and then close it. Now, instead, if I run the
above python script, everything goes fine but the GUI is closed
immediately as soon as it is opened, and the control is returned back
to python shell. I don't want this to happen. I want the GUI to stay
opened and I want the control to return back to python only when I
close the matlab GUI.

Any thoughts/suggestions will be greatly appreciated.
Jun 8 '11 #1
0 1338

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by eric rudolph | last post: by
reply views Thread by Paul McGuire | last post: by
176 posts views Thread by Thomas Reichelt | last post: by
reply views Thread by Fuzzyman | last post: by
reply views Thread by Alimah | last post: by
3 posts views Thread by Sudheer Gupta | last post: by
3 posts views Thread by Ajith Menon | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.