A few tips for learning python to share

  • 2020-04-02 09:45:54
  • OfStack

Familiar with the python language and learn how to code python.
Familiar with python library, know how to find the corresponding module when meeting the development task.
Knows how to find and obtain third-party python libraries for development tasks.

Installation development environment

If you're under window, go download pythonxy and install it, and then run python and get into the python interpretation environment.
If you are in ubuntu, execute: sudo apt-get install python, then run python from the command line to enter the python interpretation environment.

Learning methods

As a mature developer, my habit of learning new things (assuming pyqt) is:
Directly using Google search on the official website of pyqt. According to the official website, download pyqt. (if you are using ubuntu, see if there are enough new version software library inside) in the process of downloading, started to read the official website of the tutorial above. While watching tutorials, again according to the tutorial USES pyqt. If it is found that the tutorial is not comprehensive, a Google search can see whether there is a corresponding teaching books. Example to study and develop a toy application, to see if they need to use function.

Start learning python

I recommend that you follow the steps above, first going through the official python documentation:
(link: http://docs.python.org/tutorial/index.html)
Then do this website (link: http://www.pythonchallenge.com/) the above topics.

If you've been stuck in a particular mode for too long, look at the Google python challenge answer and see how the other person's code differs from your own.

Small projects

After you've done that, you'll find that you're familiar with basic python development.

Write a simple calculator/accounting software/minesweeper game (interface with pyqt library)
Write a chat room website (using webpy framework, jquery to refresh new replies)
Write a crawler, get the location of all users on douban, draw histogram of location distribution (LXML parsing, save data to sqlite, matplotlib drawing)

The FAQ

Q: where can I get help if I have a problem?
A: (link: http://groups.google.com/group/python-cn) (need over the wall) or (link: http://stackoverflow.com/) to ask questions.

Q: how do I find a feature in python?
A: look at the official documentation. (link: http://docs.python.org/library/index.html)

Q: how do you accomplish a task (like writing a website) in python?
A: Google: python writing websites, or Google: python web development.


Related articles: