Concise Python Tutorials

Source: Internet
Author: User
Tags documentation gtk qt designer in python linux

If you've finished reading the book and practiced writing a lot of programs, you must have been able to use Python very skillfully. You may also have written some Python programs to try out various Python skills and features. If you haven't done that yet, you must be quick to practice. The question now is, "What do you study next?" ”。

I would suggest that you solve the problem first: Create your own command-line address book program. In this program, you can add, modify, delete, and search your contacts (friends, family, co-workers, etc.) and their information (such as e-mail addresses and/or phone numbers). These details should be saved for later extraction.

Thinking about all the things we've learned so far, you'll find the problem quite simple. If you still want to know where to start, here's a hint.

hint (you should not actually read this hint) create a class to represent a person's information. Use a dictionary to store everyone's objects and their names as keys. Use the Cpickle module to permanently store these objects on your hard disk. Use a dictionary-built method to add, delete, and modify personnel information.

Once you've finished this program, you can say it's a Python programmer. Now, please send me a letter at once to thank me for providing you with this excellent textbook. Tell me, as you wish, but I do wish you could have told me.

Here are some ways to continue your Python path:

Graphic software

Use the Python GUI Library--you need to use these libraries to create your own graphics programs in Python language. Using GUI libraries and their Python bindings, you can create your own IrfanView, kuickshow software, or anything else like that. Bindings allow you to write programs in the Python language, and the libraries you use are written in C, C + +, or other languages.

There are many options to use the Python GUI:

PyQt This is the Python bundle for the QT toolkit. The QT Toolkit is the cornerstone of building KDE. QT, especially with QT designer and excellent QT documentation, is extremely easy to use and powerful. You can use it for free under Linux, but you need to pay if you use it under Windows. With PYQT, you can develop free (GPL-agreed) software on Linux/unix, while developing proprietary software requires payment. A good PYQT resource is the GUI programming using Python language: QT edition (WWW.OPENDOCS.ORG/PYQT), please check the official homepage (www.riverbankcomputing.co.uk/pyqt/index.php) To get more details.

PyGTK This is the python binding of the GTK + toolkit. The GTK + Toolkit is the cornerstone of building gnome. GTK + has a lot of quirks in its use, but once you get used to it, you can develop GUI applications very quickly. The Glade graphical interface designer is essential, and the documentation needs to be improved. GTK + works well on Linux, and its Windows interface is incomplete. You can use GTK + to develop free and proprietary software. Please refer to the official homepage (www.pygtk.org) for more details.

WxPython This is the python binding of the Wxwidgets Toolkit. Wxpython has a learning method associated with it. Its portability is excellent and can be run on Linux, Windows, Macs, and even embedded platforms. There are many Wxpython Ides, including GUI designers as well as SPE (Santi ' Python Editor): Http://spe.pycs.net and Wxglade (http:// GUI developers like Wxglade.sourceforge.net). You can use Wxpython to develop free and proprietary software. Please refer to the official homepage (www.wxpython.org) for more details.

Tkinter This is one of the oldest existing GUI toolkits. If you have used idle, it is a tkinter program. The Tkinter document on the pythonware.org is very thorough (www.pythonware.com/library/tkinter/introduction/index.htm). Tkinter is portable and can work under Linux/unix and Windows. Importantly, Tkinter is part of the standard Python release.

For more choices, see GUI Programming wiki page on python.org: www.python.org/cgi-bin/moinmoin/GuiProgramming.

GUI Tools overview

Unfortunately, there is no single standard Python GUI tool. I suggest you choose one of the above tools according to your situation. The primary consideration is whether you are willing to pay for GUI tools. The second consideration is whether you want your program to run under Linux, under Windows, or both. The third consideration depends on whether you are a KDE user under Linux or a gnome user.

Chapters of the future

I'm going to write one or two chapters on GUI programming for this book. I might choose Wxpython as a toolkit. If you want to express your opinion on this subject, please add Byte-of-python mailing list: Http://lists.ibiblio.org/mailman/listinfo/byte-of-python. In this mailing list, the reader will discuss with me how to improve the book.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.