Summer Daze

From Linux with Python

author.png Posted by Chris date.png Thu 6 Jul time.png 21:36 [Tag] Computing, Programming, Projects views.png 218 Views

 
Everyone seems to be banging on about Python in the Linux community and with good reason. I have dabbled with Python but never created anything that really did anything so I decided to create a very simple CLI based chat server/client. Python makes handling socket's very easy and the whole program is just over 100 lines of code. I decided however that I wanted to learn more about building GUI apps via event driven programming, using Glade to design the GUI and GTK via PyGTK as the toolkit. So using a guide as reference titled GUI - The Pythonic Way (BTW the code in the guide does not run and has many bugs but I was interested in the information regarding how to use Glade and GTK with Python not the code to hack a calculator Cheeky) I created a basic calculator which to my surprise was very easy to do and rather fun and quick being only 91 lines of programming. The Calculator is now available from the Programming Page.

Having heard about how Python can run on other OS's my next stop was Windows. Don't worry I didn't leave Linux to do this, just emulated WinXP using VMware. Amazingly after installing Python, GTK, PyGTK and PyCairo. All I had to do was start the program and that was it, it was working fine under Windows with no modifications to the code which is very impressive, esp as it's the first time I have created a GUI app and had it run on more than one OS.

media/linux/pycalc-linux.png media/linux/pycalc-windows.png


I shall certainly be experimenting more with Python, one day I might even hack something useful Cool



comment.png 1 Comment
Monday 1st December 2008 @ 16:41
Tim


Location: United Kingdom
Joined: 26/03/05
Nice work there!!!
 
My deviantART gallery

Submit your comment

 
You must be a registered user and logged-in to post comments.

Login or Register
 
View All - View Archive Page:     1 2 3 ... 38 39 40 [Next]