12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Cool PyDoc trick of the day: if you leave the module name empty inthe top input field of the window in Figure 14-1 and press the OpenBrowser button, PyDoc will produce a web page containing a hyperlinkto every module you can possibly import on your computer. Thisincludes <strong>Python</strong> standard library modules, modules of third-partyextensions you may have installed, user-defined modules on yourimport search path, and even statically or dynamically linked-in C-coded modules. Such information is hard to come by otherwisewithout writing code that inspects a set of module sources.PyDoc can also be run to save the HTML documentation for a modulein a file for later viewing or printing; see its documentation forpointers. Also, note that PyDoc might not work well if run on scriptsthat read from standard input—PyDoc imports the target module toinspect its contents, and there may be no connection for standardinput text when it is run in GUI mode. Modules that can be importedwithout immediate input requirements will always work under PyDoc,though.Standard Manual SetFor the complete and most up-to-date description of the language and its toolset,<strong>Python</strong>’s standard manuals stand ready to serve. <strong>Python</strong>’s manuals ship in HTMLand other formats, and are installed with the <strong>Python</strong> system on Windows—they areavailable in your Start button’s menu for <strong>Python</strong>, and they can also be opened fromthe Help menu within IDLE. You can also fetch the manual set separately from http://www.python.org in a variety of formats, or read them online at that site (follow theDocumentation link). On Windows, the manuals are a compiled help file to supportsearches, and the online versions at <strong>Python</strong>.org include a web-based search page.When opened, the Windows format of the manuals displays a root page like that inFigure 14-4. The two most important entries here are most likely the Library Reference(which documents built-in types, functions, exceptions, and standard librarymodules), and the Language Reference (which provides a formal description oflanguage-level details). The tutorial listed on this page also provides a brief introductionfor newcomers.Web ResourcesAt the official <strong>Python</strong> programming language web site (http://www.python.org), you’llfind links to various <strong>Python</strong> resources, some of which cover special topics ordomains. Click the Documentation link to access an online tutorial and the BeginnersGuide to <strong>Python</strong>. The site also lists non-English <strong>Python</strong> resources.You will find numerous <strong>Python</strong> wikis, blogs, web sites, and a host of other resourceson the Web today. To sample the online community, try searching for “<strong>Python</strong> programming”in Google.<strong>Python</strong> Documentation Sources | 289

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!