0

I have a school project in which i need to create a program that derives simple equations and it requires some sort of GUI. I found out that Jupyter(has all Python tools) has the math tools i need to make my program. However, creating a GUI in python isn't as convenient as i thought. So, would it be possible to make a GUI using Visual Studio form design that sends data to a python program to be executed, then send the result back to be displayed in the visual studio GUI.

For example, I enter an equation, "3x^3", in Visual Studio GUI program. The equation is then sent to a python program where it is executed and stored. Afterwards, it is sent back to the Visual Studio GUI and displayed as the answer.

1 Answers1

1

There are 3 ways I can think of in which you can achieve what you want :

  1. Create the GUI in python, there are several modules who support this : pyqt, tkinter and more.. Have a look at : https://wiki.python.org/moin/GuiProgramming

  2. You can write your python program, turn it into an exe and call the process from the C# application, have a look at : py2exe.

    In case you decide to do create an exe file, have a look at my answer to this post : On how to access windows CMD (I think it would be the easiest way for you to run the python process) - use python to run commands in batch file

    If you dont run through the CMD have a look at the subprocess module.

  3. Run the python script directly from C#, have a look at this : How do I run a Python script from C#?

Rohi
  • 814
  • 1
  • 9
  • 26