Borrar filtros
Borrar filtros

Open a python file in Matlab appdesigner.

18 visualizaciones (últimos 30 días)
Marwah Rehman
Marwah Rehman el 8 de Feb. de 2022
Respondida: Sai Gokul el 12 de Jul. de 2023
I created a GUI on python using tkinter and i also have a GUI on matlab that i created using appdesigner. I would essentially like to press a button on the appdesigner that will open the python file that i can run. This way both my GUIs are connected. Is there a way to do this? Any help would be appreciated. Thank you.
  2 comentarios
Anupreet Singh
Anupreet Singh el 10 de Feb. de 2022
I am also wondering about this - does this functionality exist in MATLAB?
Javeria Ahmed
Javeria Ahmed el 10 de Feb. de 2022
I also have this issue, how can I use matlab as an interface for my python code?

Iniciar sesión para comentar.

Respuestas (1)

Sai Gokul
Sai Gokul el 12 de Jul. de 2023
Hello Rehman,
I understand that you want to you want to open tkinter GUI from MATLAB App Desiger
Here's an approach you can follow:
In the callback function associated with the button in MATLAB, you can use the 'pyrunfile' command to execute a Python script. For example, you can use the following code snippet:
function openPythonGUIButtonPushed(app, event)
pyrunfile("python path/to/your/python_script.py");
end
You can also refer to the documentation below :

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by