- Start by subscribing to Python Weekly mailinglist. Good overview of new projects, libraries, etc.
- Depending on your programming experience, skip/skim/follow/study a course book. For free/online, you have for instance,
- Dive Into Python which is example-heavy & aimed at people with some programming background.
- How To Think Like a Computer Scientist starts more from scratch, and is also used in an introductory programming MIT OCW course for electrical engineering students if you want video lectures/excercises/exams.
- Install globally pip, package manager for Python packages.
- Install globally, using pip , virtualenv and virtualenvwrapper, tools that create & help manage seperate virtual environments so you can try out Python packages without screwing existing configurations, have per-project sets of Python packages, etc.
- After that, create a virtual environment per project, and install required Python packages using pip per-virtual environment.
- For learning a new language, starting out simple, e.g. running scripts without an IDE is probably better.
- Definitely install IPython. So instead of running small scripts on the command line, you can start out using IPython to learn by adapting/running small snippets (and then move to more extensive use of the notebooks if wanted, see below).
- After scripts & snippets, pick an IDE for more extensive development.
- I gradually added extra plugins that made my editor-of-choice (vim) into a light-weight Python IDE (is console-based, adds the vim-learning curve to it).
- Other option is the Pycharm IDE, heard good things about it, and I'm considering switching to it myself, as refactoring etc. larger projects is proving to be difficult (is GUI-based).
Python has a "batteries included" philosophy, i.e. you should be able to cover most cases with the libraries included and install advanced/specialist libraries if needed.
- Scroll through the Python standard library, and try out some example snippets that you will likely use.
- For specific library modules that you are sure you will need in to future, look at the Python Module of the Week. This site dives into each module in the standard library.
- For some things, the standard library will likely be all you need, e.g. for file operations and basic OS-interaction when running scripts. For other things it depents on your use. For instance, likely the built-in datetime functionality is sufficient, and it is not worth it to add extra dependencies on other libraries. In other cases, you will fast feel the limites of the standard library, for instance in the case of HTTP-handeling, where external libraries are much better.
In any case, you can trust the standard library to be high-quality, standards-compliant and well-supported/built-in, so knowing what is in there is handy.
- Syntactic style: Python has style guidelines, of which some are more hard (e.g. indentation) then others, but human-readability is prioritised in general. Probably most easy to add an external program to your workflow that checks syntax, e.g. flake8 or pylint.
- logging, e.g. build-in logging functionality
- testing: options are included in the standard library, or extended externally
- debugging, choice depends on your programming-workflow e.g. debugging in IPython.
- A big list of popular libraries
- Libraries with well-designed API's are IMHO for example requests
- For datascience: pandas and scikit-learn
- IPython notebooks are used to share projects & explorations in datavisualisation, cf. gallery of examples
- The Python bindings to the OpenCV computer vision library are fun to play with.
- Somewhat generally useful libraries I use frequently are requests, the lxml library for XML/HTML-processing, tablib for reading/writing tabular data, flask for getting a fast website/REST-interface running.
- I also really like the Redis-database and its Python-bindings for persistance when logging/scraping/datamanipulating. Alternatives are the build-in shelve library and an SQL ORM such as SQLAlchemy.
- Perhaps writing a plugin for an active, modular audio-related project is a good excercise? For instance I use beets as music-organiser, and modipy is a hackable music server.