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

Discussion in 'Python' started by imperialguy, Jun 8, 2011.

  1. imperialguy

    imperialguy

    Joined:
    Apr 13, 2011
    Messages:
    5
    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:

    Code:
    from pymatlab.matlab import MatlabSession 
    session = MatlabSession() 
    session.run('cd ~/ratter/ExperPort') 
    session.run('addpath(genpath(pwd))') 
    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.
    imperialguy, Jun 8, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    14
    Views:
    452
    sjdevnull@yahoo.com
    Sep 1, 2006
  2. siki
    Replies:
    0
    Views:
    954
  3. Luna Moon
    Replies:
    16
    Views:
    1,334
    Giovanni Gherdovich
    Aug 8, 2008
  4. Ven
    Replies:
    0
    Views:
    200
  5. Iñaki Baz Castillo
    Replies:
    7
    Views:
    849
    Iñaki Baz Castillo
    Jan 12, 2010
Loading...

Share This Page