C# Front-End to Python

12 Apr

I am best at coding in Python, but when it comes adding GUIs, I find myself lacking. My very first C# program was a plugin that had one line of code

System.Diagnostics.Process.Start("http://www.webpage.com");

That led to my second, which just replaced the URL with “python MyApp.py.” It finally clicked. I could just use the drag and drop GUI form builder in C# Visual Studio Express. Connect each python script to a button, pass text box values to the python script using sys.argv and grab the output as a string. The best part is I found a function for this on CodeProject.

So now I can write python scripts for my functionality and use a windows form for the GUI control.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: