I mainly got introduced to python because of a friend who wanted to do something worthwhile rather
than pondering over comics. I admit first impressions weren't good at all as I shared my hatred for
verbose languages with quite a few. Usually it starts with some script seeing and later total diving but
this is totally the other way around . Python is one of the easiest languages there and always will be .
The reason I took an initial liking was because the core programming scripts are understand and short. You could handle files with a few lines of code which kinda represent your every day language (I.e that is if you speak any English).Python combines styles from different languages. You could write your for
loops by using the C/C++/Java way or just write it using a way python provides. It doesn’t enforce an environment on you.
Python doesn't require you to reinvent the wheel. There are modules which are present and its a taboo for you to code them again. Almost all the string operations which are added in python . No, you don't
have to write a program to reverse strings, it's there for you and you just have to call the function.
Python will spoonfeed you with almost everything . This may be considered bad by some programmers, but according to me it allows us to concentrate on something far more important than reversing string
:p
I started off with 2x which is python version 2. It's really simple because its got both object oriented and procedural approaches combined. The thing about 2x is that there are many ways of doing things. There are functions like filter, reduce and lambda ( anonymous functions) which again will make your life
easier.
The mistake I made initial was learning both 2x and 3x together. 3x is a developmental version. They release a new version every week or so. The thing about using 3x is that you make not be blessed with the latest binaries and libraries for the frameworks which are already in place(source: Installing pygame on version 3x was a pain in my anatomy) .
Python has many web frameworks which are usually updated by keeping tabs on the guys at ROR.
People usually choose Django over other frameworks which isn't the most lightest (flask is the lightest) but is the most famous with Django Unchained et al.
Python also allows you build clean interfaces using Tkinter . I usually don't use Tkinter but the code is quite small and compact. This is code for a simple hello world program in Tcl/tk
import tkinter as tk
class Application(tk.Frame): def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.hi_there = tk.Button(self)
self.hi_there["text"] = "Hello World\n(click me)"
self.hi_there["command"] = self.say_hi
self.hi_there.pack(side="top")
self.QUIT = tk.Button(self, text="QUIT", fg="red",command=root.destroy)
self.QUIT.pack(side="bottom")
def say_hi(self):
print("hi there, everyone!")
root = tk.Tk()
app = Application(master=root)
app.mainloop()
That's it. I've never used it for my GUI programming but would definitely want to. This could be of great
use if you don’t understand symbols and I don’t see why anyone shouldn’t get it. Many of the problems
for which I wrote 1 page long codes have been seldom reduced to a single line. It’s a great platform for beginners and just builds on the novice’s knowledge.
than pondering over comics. I admit first impressions weren't good at all as I shared my hatred for
verbose languages with quite a few. Usually it starts with some script seeing and later total diving but
this is totally the other way around . Python is one of the easiest languages there and always will be .
The reason I took an initial liking was because the core programming scripts are understand and short. You could handle files with a few lines of code which kinda represent your every day language (I.e that is if you speak any English).Python combines styles from different languages. You could write your for
loops by using the C/C++/Java way or just write it using a way python provides. It doesn’t enforce an environment on you.
Python doesn't require you to reinvent the wheel. There are modules which are present and its a taboo for you to code them again. Almost all the string operations which are added in python . No, you don't
have to write a program to reverse strings, it's there for you and you just have to call the function.
Python will spoonfeed you with almost everything . This may be considered bad by some programmers, but according to me it allows us to concentrate on something far more important than reversing string
:p
I started off with 2x which is python version 2. It's really simple because its got both object oriented and procedural approaches combined. The thing about 2x is that there are many ways of doing things. There are functions like filter, reduce and lambda ( anonymous functions) which again will make your life
easier.
The mistake I made initial was learning both 2x and 3x together. 3x is a developmental version. They release a new version every week or so. The thing about using 3x is that you make not be blessed with the latest binaries and libraries for the frameworks which are already in place(source: Installing pygame on version 3x was a pain in my anatomy) .
Python has many web frameworks which are usually updated by keeping tabs on the guys at ROR.
People usually choose Django over other frameworks which isn't the most lightest (flask is the lightest) but is the most famous with Django Unchained et al.
Python also allows you build clean interfaces using Tkinter . I usually don't use Tkinter but the code is quite small and compact. This is code for a simple hello world program in Tcl/tk
import tkinter as tk
class Application(tk.Frame): def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.hi_there = tk.Button(self)
self.hi_there["text"] = "Hello World\n(click me)"
self.hi_there["command"] = self.say_hi
self.hi_there.pack(side="top")
self.QUIT = tk.Button(self, text="QUIT", fg="red",command=root.destroy)
self.QUIT.pack(side="bottom")
def say_hi(self):
print("hi there, everyone!")
root = tk.Tk()
app = Application(master=root)
app.mainloop()
That's it. I've never used it for my GUI programming but would definitely want to. This could be of great
use if you don’t understand symbols and I don’t see why anyone shouldn’t get it. Many of the problems
for which I wrote 1 page long codes have been seldom reduced to a single line. It’s a great platform for beginners and just builds on the novice’s knowledge.
No comments:
Post a Comment