Introducing Python


Python is a powerful yet easy to use programming language developed by Guido van Rossum, first released over a decade ago in 1991. With Python, you can quickly write a small project. But Python also scales up nicely and can be used for mission-critical, commercial applications.

HINT

If you check out any Python documentation, you may notice an alarming number of references to spam, eggs, and the number 42. These references all pay homage to Monty Python, the English comedy troupe that inspired Python's name. Even though Guido van Rossum named Python after the group, the official mascot of the language has become a cute, little, green snake. (Which is really for the best, since it would be pretty hard to fit six British comedians' faces on a program icon anyway.)

There are a lot of programming languages out there. What's so great about Python? Let me tell you.

Python Is Easy to Use

The major goal of any programming language is to bridge the gap between the programmer's brain and the computer. Most of the popular languages you've probably heard of, like C, C++, C#, and Java, are considered high-level languages, which means that they're closer to human language than machine language. And they are. But Python, with its clear and simple rules, is even closer to English than any of these. Creating Python programming is so straightforward that it's been called "programming at the speed of thought."

Python's ease of use translates into productivity for professional programmers. Python programs are shorter and take less time to create than programs in many other popular languages. In fact, Python programs are typically 3 to 5 times shorter than equivalent Java programs, and often 5 to 10 times shorter than equivalent C++ programs. There's even some evidence to suggest that a single Python programmer can finish in two months what takes two C++ programmers more than a year to complete.

Python Is Powerful

Python has all the power you'd expect from a modern programming language. By the end of this book, you'll be able to write programs that employ a GUI, process files, and incorporate multimedia elements like graphics, sound, and animation.

Python is powerful enough to attract hundreds of thousands of programmers from around the world as well as companies such as Google, Hewlett-Packard, IBM, Industrial Light + Magic, Microsoft, NASA, Red Hat, Verizon, Xerox, and Yahoo!. Python is also used as a tool by professional game programmers. Activision, Electronic Arts, and Infogrames all publish games that incorporate Python.

Python Is Object-Oriented

If you know anything about programming, you've probably heard the term object-oriented programming, or OOP for short. It's certainly a hot topic, and OOP are three letters every programmer wants on their resume. OOP is basically a shift in the way programmers think about solving problems with computers. It embodies an intuitive way of representing information and actions in a program. It's not the only way to write programs, but for most large projects, it's the way to go.

Languages like C#, Java, and Python are all object-oriented. But Python does them one better. In C# and Java, OOP is not optional. This makes short programs unnecessarily complex, and it requires a bunch of explanation before a new programmer can do anything significant. Python takes a different approach. In Python, using OOP techniques is optional. You have all of OOP's power at your disposal, but you can use it when you need it. Got a short program that doesn't really require OOP? No problem. Got a large project with a team of programmers that demands OOP? That'll work too. Python gives you power and flexibility.

Python Is a "Glue" Language

Python can be integrated with other languages such as C, C++, and Java. This means that a programmer can take advantage of work already done in another language while using Python. It also means that he or she can leverage the strengths of other languages, such as the extra speed that C or C++ can offer, while still enjoying the ease of development that's a hallmark of Python programming.

Python Runs Everywhere

Python runs on everything from a Palm to a Cray. And if you don't happen to have a supercomputer in the den, you can still run Python on Windows, DOS, Macintosh , or Linux machines. And that's just the top of the list. Python can run on practically every operating system in existence.

Python programs are platform independent, which means that regardless of the operating system you use to create your program, it'll run on any other computer with Python. So if you write a game on your PC, you can e-mail a copy to your friend who runs Linux or to your aunt who has a Mac, and the program will work (as long as your friend and Aunt have Python on their computers).

Python Has a Strong Community

A lot of people use Python, and the community is growing all the time. In fact, the traffic at the comp.lang.python newsgroup, where all kinds of people come together to discuss Python, doubles almost every two years.

Now, most programming languages have a dedicated newsgroup. But Python also has something called the Python Tutor mailing list, a more informal way for beginning programmers to ask those first questions. The list is at http://mail.python.org/mailman/listinfo/tutor. Although the list is called Tutor, anyone, whether novice or expert, can answer questions.

There are other Python communities focused on different areas, but the common element they share is that they tend to be friendly and open. That only makes sense since the language itself is so approachable for beginners.

Python Is Free and Open Source

Python is free. You can install it on your computer and never pay a penny. But Python's license lets you do much more than that. You can copy or modify Python. You can even resell Python if you want (but don't quit your day job just yet). Embracing open-source ideals like this is part of what makes Python so popular and successful.




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net