The Follow-up To The Python GUI Project

I am well aware of the fact that I didn’t post any updates on my GUI python project which i had come to explain in my previous post. Can’t help but lack of time and semester exams have kept me busy for quite some time. But as one of my good friends pointed out,a man must keep his words,hence I shall finish the sequence with an article detailing what really transpired after I set my foot on this challenging adventure.

[A little Yin-Yan style Python Logo from me.Interested,anyone?]

Image

So,finally we settled on the following configuration for our project:

  • PyQT4 for the front~end[GUI] of our project.
  • PyGame for the interactive coding portion of the algorithms.

After going through many other alternatives,I chose to settle down with the above configuration. PyQT, being a more general purpose framework for developing desktop style applications,had a lot of features to offer. Its also quite flexible in its usage,allowing convenient GUI designing,modification and making additions to your current project. Simply irresistible,had to go for it.

Lo and behold,the mighty PyQT!

Lo and behold,the mighty PyQT!

Pygame was a discovery I’m glad me and my friend,Prateek Kumar Jain made early. We were searching for a suitable graphics package that didn’t make exceptional demands in terms of comprehending the technicalities..and was fun to use too.

Cute Pygame logo :)

Cute Pygame logo 🙂

PyGame designed Algorithm Visualizer Module ,courtesy,Prateek Kr. Jain.

PyGame designed Algorithm Visualizer Module ,courtesy,Prateek Kr. Jain.

 

 Trials and Tribulations-The Journey!

indexhobbit

Well,as it so often happens in life,its the journey which defines you ultimately,is certainly not the primrose path you envisioned it to be!

Once I had set my foot on this adventure of epic proportions(a little exaggeration I believe!),there was no turning back. I was quick to come up with a basic GUI layout,a bare-bone definition of the desired functions, and an action plan on how to get the show on the road(of which now,when I reflect,I can confidently say,I knew nothing about). But it turned out,I had come to underestimate the task at hand.

Pitfalls

First,my assumption,that PyQT would be easy to use,turned out to be blatantly false. Its a fairly complex platform,which consists of two primary domains which require mastery:The front-end,which is easily dealt with using the QtDesigner module and the back-end, which consists of using the Qt specified suite of python classes. Now both these domains intermingle,with the resulting software being very powerful,but equally complex to build. It has the concept of ‘slots’ and ‘signals’: just another name for functions and the data supplied to the functions respectively.

2014-06-27 16_46_02-Greenshot

The back~end generated code for the GUI,with hand-coded software functionality.

Secondly,getting the functionality down to actual code implementation was a hurdle that I didn’t forsee. I came to realize how much hard work goes into coding even the most basic of software features-an easy click of the mouse button and a new menu opens or a new shape appears-all so easy to the eyes but a surprisingly arduous coding feat.

The piece of code that took my sleep away :D

The piece of code that took my sleep away 😀

 

The Struggle,Pain and The Moment of Triumph

Well I worked my way through the PyQt’s intimidating maze of classes and GUI elements. Then I had to figure out a way to connect the chosen elements to the desired functions-all of which made my eyes go red and the moon to wax and wane with me.

After toiling for long,editing the logo,getting the GUI right,generating the code,furious command prompt usage and then hand coding the backend,the software was complete.

Now the algorithms part is another tale,which required 500 to 600 lines of code programming using PyGUI python module.

2014-06-27 17_12_53-

My teammate Prateek helped me with coding them and getting them to work properly.

2014-06-27 17_17_08-DFS ALGORITHM

It worked flawlessly. Our software is by no means a complex or large scale project. It’s a small scale application,with few resources and a simple GUI and basic operations. But the satisfaction I got out of completing it:priceless.

I learned to respect desktop application coders,got to code a bit(a lot! :P) and understood how to make things work,even when nothing seems to be.

Finally! My Frankenstein is alive!

Finally! My Frankenstein is alive!

Hence,I hope whosoever stumbles upon this post may take heart in the fact that anything can be achieved,turned into a reality,if you’re willing to go the distance for it. Since our limits,just like our fears,are often just an illusion 😉

 

 

 

Advertisements