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 😉

 

 

 

A GUI Software Project In Python [Challenge~To~Self]

Image

As part of my Software Engg. project,my entire class was subdivided into groups of 4 people and asked to develop a fully functional,semi-professional software complete with documentation and all that jazz. Many of my peers opted for a rather monotonous,”C++ programming language” approach and went down the well trodden path of churning out mediocre,non-GUI(or Visual Basic simple GUI) based software. But the adventurer in me would never let me do that. And as Robert Frost said in his excellent poetry composition,

The Road Not Taken

I took the one less traveled by,

So I’ve decided to up the ante by coding in Python(fairly proficient in it) and using a GUI development kit[TKinter or pyQT] as my weapon of choice. Easier said than done! The main challenges I currently face are:

soft_model

  • Choosing a software development model which will fit my requirement just about right{if you’re thinking its too much for a college project,think again,as the IEEE SRS(Software Requirement Specification) explicitly requires details about the model choice tha you make}.
  • Assessing the viability of the multitude of project specific ideas that I’ve come to pen down with my group-mates.
  • Finally,going ahead and *attempting* to code this monstrosity,not to mention the technical aspects to master while using the GUI framework,yikes!

Ah! Dilemma! But what’s life without sleep-less nights and the all encompassing emotion of being screwed?  No fun becoming a Computer sc. Engineer without having engineered a penny’s worth of decent work,now isn’t it?

I’ve got a lot of work at my hands,but pain’s the name of the game.So I’ve started my pilgrimage by knocking on the doors of pyQT and initiated the learning endeavour right away.

I’ll keep posting more interesting challenges as they come up(more like a journey log) and probably point out all the things that go right for anyone with the remotest interest in undertaking such perilous voyage.