Abdullah Diab’s Blog

I’m Learning Python part 1

I’m Learning Python
Python Logo

I’ll start posting this series of blogs on WordPress and CSC, here I’ll write what I’m gonna learn on my way to learning Python.

If you don’t know what Python is, or you’ve heard about it but you’re not sure what it is, my first blog will cover it for you.

What is Python?

Python is a programming language, this programming language was created in 1990, this programming language has proved its power through the last 18 years she’s been with us.

Why should I be interested in learning a new language?

The most points that will catch your interest in this language are:

  • It’s Object Oriented:

    Python supports classes, inheritance, multiple inheritance, polymorphism, operator overloading and more.

    Python is OOP from ground up, besides it’s like C++ supports both object oriented and procedural programming, so it may be used for scripting applications.

  • It’s Free:

    Python is completely free to use and redistribute, it is also widely supported through web portals where millions of users world-wide can help you find solutions for your problems.

  • It’s Portable:

    Python first was written in C, and because of that it can be run on almost every platform, you can run it on (Windows, Linux, Mac OS, BeOS, PDAs, Cell Phones, Gaming Consoles, …).

    Everything is portable, that’s because Python code is compiled into byte-code (Like .NET and Java), and so it can be run on any platform with a Python interpreter.

  • It’s Powerful:

    Python sits on the chair along with Perl, Tcl and Scheme as a powerful scripting language, while also it sits on the chair with Java and .NET as a powerful Pure OOP language, and of course it shares the chair with C and C++ as a powerful programming language that is capable of doing everything.

    While sitting on more than one chair at the same time, Python provides the simplicity in writing a fully readable code.

    From its most powerful features I’ll write some and I’ll explain them deeply when I understand them 😀

    1. Dynamic Typing.
    2. Automatic Memory Management:
    This one I already know from .NET, Python has its own garbage collector which runs automatically and deallocates space from unused objects in the memory.
    1. Programming for large systems using OOP allows you to develop components and systems so you can reuse them in most of your applications.
    2. Built-in tools used for manipulating built-in types such as lists and collections.
    3. Libraries from regular expressions to networking, all libraries can be used easily.
    4. Third-party utilities: since Python is open source developers from around the globe can build their tools and libraries and everybody can use them.
  • It’s Mixable:

    You can use Python and call your programs and methods from inside C and C++ and even Java and .NET, you can also call C and C++ methods and tools from Python along with Java and .NET.

  • It’s easy to use and learn:

    You’ll notice just like I have that Python is an easy yet powerful language which can be used in every technical field without losing it simplicity.

What can I do with Python?

Here I’ll tell you what fields you can use Python in, but in a glance ‘cuz I don’t know how to use it yet.

  • System Programming:

    Because it can be used as scripting language, Python can be used to develop shell tools, which can communicate with system shell and provide a layer for you to search files and folders, launch applications and even do parallel processing using processes and threads.

  • GUIs:

    Using Tk GUI, Qt, GTK, MFC and Swing you can make your application have a GUI, but not any GUI, your GUI is cross-platform and you’d be able to run your application on any platform.

  • Internet Scripting:

    You can develop web applications using Python, you can do Server scripting, Server-Client Scripting and Client Scripting.

    A lot of websites already use Python now.

    You can use FTP to transfer files, parse XML files, parse HTML and you can generate HTML based on Python code.

  • Gluing:

    Python can be glued to C, C++, .NET and Java applications.

    Python now has 3 major implementations: CPython which is the base implementation, Jython which can be run inside the JVM (Java Virtual Machine), and IronPython .NET which can be run inside .NET Framework.

  • Database Applications:

    Python can use Sybase, Oracle, Informix, ODBC, MySql, PostgreSQL, SQLite and more.

    Python even has a built in database API which can be used with any database system, you can easily change it from anyone to anyone by just switching the used interface.

  • Numeric and Scientific Programming:

    Python can be used easily to create scientific applications, there is an extension called NumPy which can do more than Matlab!

    You can calculate 22000 in milliseconds:













    You don’t have to wait to get this value 😀

  • More:

    Python can be used in more fields, XML, Gaming, Graphics, Robots, Networking and more, everything is possible 🙂

Bottom Line:

That’s enough for today, hope I’ll tell you more on my next blog.

For now I’d suggest you to read more about the language and its features from the language website: www.Python.org.

And also don’t forget to download the appropriate built for your platform.