Python Forum

Full Version: Convert the typical MATLAB GUI creator code to Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I'm very new to Python. I'd like to seek your thoughts and expertise on how to convert the following MATLAB code to Python.

    function varargout = compression(varargin)
    gui_Singleton = 1;
    gui_State = struct('gui_Name',       mfilename, ...
                       'gui_Singleton',  gui_Singleton, ...
                       'gui_OpeningFcn', @compression_OpeningFcn, ...
                       'gui_OutputFcn',  @compression_OutputFcn, ...
                       'gui_LayoutFcn',  [] , ...
                       'gui_Callback',   []);
    if nargin && ischar(varargin{1})
        gui_State.gui_Callback = str2func(varargin{1});
    end

    if nargout
        [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    else
        gui_mainfcn(gui_State, varargin{:});
    end
Thanks in advance for sharing your solutions.
google: 'python matlab'

example: https://www.mathworks.com/products/matla...ython.html

Make an attempt at conversion, we will be glad to help when you encounter problems.