you can use it for everything from website development and gaming to robotics and spacecraft control.
Python’s built-in interfaces to operating-system services make it ideal for writing portable, maintainable system-administration tools and utilities (sometimes called shell
Python programs can search files and directory trees, launch other programs, do
parallel processing with processes and threads, and so on. Python’s standard library comes with POSIX bindings and support for all the usual OS tools:
environment variables, files, sockets, pipes, processes, multiple threads, regular
expression pattern matching, command-line arguments, standard stream interfaces,
shell-command launchers, filename expansion, and more.
In addition, the bulk of Python’s system interfaces are designed to be portable; for example, a script that copies directory trees typically runs unchanged on all major Python platforms.
The Stackless Python system, used by EVE Online, also offers advanced solutions to multiprocessing requirements.
GUIs graphical user
Python’s simplicity and rapid turnaround also make it a good match for graphical user
interface programming. Python comes with a standard object-oriented interface to the
Tk GUI API called tkinter (Tkinter in 2.6) that allows Python programs to implement
portable GUIs with a native look and feel.
Python/tkinter GUIs run unchanged on Microsoft Windows, X Windows (on Unix and Linux), and the Mac OS (both Classic and OS X).
A free extension package, PMW, adds advanced widgets to the tkinter toolkit. In addition, the wxPython GUI API, based on a C++ library, offers an alternative toolkit for constructing portable GUIs in Python.
Python comes with standard Internet modules that allow Python programs to perform
a wide variety of networking tasks, in client and server modes. Scripts can communicate
over sockets; extract form information sent to server-side CGI scripts;
transfer files by FTP; parse, generate, and analyze XML files; send, receive, compose, and parse email; fetch web pages by URLs; parse the HTML and XML of fetched web pages; communicate over XML-RPC, SOAP, and Telnet; and more. Python’s libraries make these
tasks remarkably simple.
the component integration role earlier when describing Python as a control language. Python’s ability to be extended by and embedded in C and C++ systems makes it useful as a flexible glue language for scripting the behavior of other systems and components.
For instance, integrating a C library into Python enables Python to test and launch the library’s components, and embedding Python in a product enables onsite customizations to be coded without having to recompile the entire product (or ship its source code at all).
There are Python interfaces to all commonly used relational database systems—Sybase, Oracle, Informix, ODBC, MySQL, PostgreSQL, SQLite, and more.
The Python world has also defined a portable database API for accessing SQL database systems from Python scripts, which looks the same on a variety of underlying database systems.
For instance, because the vendor interfaces implement the portable API, a script written to work with the free MySQL system will work largely unchanged on other systems (such as Oracle); all you have to do is replace the underlying vendor interface.
Gaming, Images, Serial Ports, XML, Robots, and More
- Game programming and multimedia in Python with the pygame system.
- Serial port communication on Windows, Linux, and more with the PySerial extension.
- Image processing with PIL, PyOpenGL, Blender, Maya, and others.
- Robot control programming with the PyRo toolkit.
- XML parsing with the xml library package, the xmlrpclib module, and third-party extensions.
- Artificial intelligence programming with neural network simulators and expert system shells.
- Natural language analysis with the NLTK package.
As a general-purpose language that supports integration, Python is widely applicable.
If you like this post, don’t forget to share 🙂