Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:not': 0.03; '22,': 0.09; 'subject:Why': 0.09; 'cc:addr:python-list': 0.11; "'__doc__',": 0.16; "'__file__',": 0.16; 'wrote:': 0.18; '>>>': 0.22; 'cc:addr:python.org': 0.22; '>>>': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'feature': 0.29; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; 'names.': 0.31; 'another': 0.32; 'received:209.85.212': 0.32; 'received:209.85': 0.35; 'received:google.com': 0.35; 'useful': 0.36; 'subject:?': 0.36; 'list': 0.37; 'received:209': 0.37; 'skip:& 10': 0.38; 'skip:[ 10': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; 'how': 0.40; 'then,': 0.60; 'provide': 0.64; 'jul': 0.74 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=K2gpuwxybhLOFiRu6IRKZ6Zjzn0Z4K23csrJlZHW8dA=; b=Xa86r6DiO6v/2sV8sqxqE8epPLjFvYX+GlpAxRkyCtDcVH1DI9q15AFdfNW6t2GxGD cn215lrC/zwD6PV8u9zzBaiRzje08i/cndXiCNmNgXilaAGD1HEMqFbnVqZyQzS7yGzl uJK+0iFuxF7WG+QJoYHBlyq8L+HO4pXFrEzQinjm3OIrdt0paXhDPG+Od/1Une21+2uq fsWp1TCVbC44PoMw8hnXfxKvYffZNr59lOS0ojqDRbUCujmxppgoIDI2Zfz30XJKjD+U 6wsGTdgAGi2d3xmdsR6fqOYyyfUY+yfMkVBMG8LjgxFmh2dQYG+biMfGQuv1fEA/+g+k GAAw== X-Gm-Message-State: ALoCoQlymV/1y6fL+1dQLBBRZif0V+FryxKlq2YuKNdoQbO2QNNOh7lSHF3sbF7YfuHmsYegG501 X-Received: by 10.180.24.66 with SMTP id s2mr18607179wif.33.1406067782285; Tue, 22 Jul 2014 15:23:02 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <6e09bc9c-d510-4076-b20d-32df796ca59e@googlegroups.com> From: Chris Kaynor Date: Tue, 22 Jul 2014 15:22:41 -0700 Subject: Re: Why does not pprint work? To: emile Content-Type: multipart/alternative; boundary=f46d043be1d0b1948304fecfaa72 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 57 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406067789 news.xs4all.nl 2947 [2001:888:2000:d::a6]:58017 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75034 --f46d043be1d0b1948304fecfaa72 Content-Type: text/plain; charset=UTF-8 On Tue, Jul 22, 2014 at 3:17 PM, emile wrote: > Then, how can I list all the function of pprint? >> > > use the dir builtin: > > >>> dir (pprint) > ['PrettyPrinter', '_StringIO', '__all__', '__builtins__', '__doc__', > '__file__', '__name__', '_commajoin', '_id', '_len', '_perfcheck', > '_recursion', '_safe_repr', '_sys', '_type', 'isreadable', 'isrecursive', > 'pformat', 'pprint', 'saferepr'] Another useful feature is the "help" function (can be used like "help(pprint)" or just "help()" for interactive usage), which will also provide the documentation for each item in addition to just the names. Chris --f46d043be1d0b1948304fecfaa72 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= ue, Jul 22, 2014 at 3:17 PM, emile <emile@fenx.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
Then, how can I list all the= function of pprint?

use the dir builtin:

>>> dir (pprint)
['PrettyPrinter', '_StringIO', '__all__', '__bu= iltins__', '__doc__', '__file__', '__name__', &= #39;_commajoin', '_id', '_len', '_perfcheck', &= #39;_recursion', '_safe_repr', '_sys', '_type',= 'isreadable', 'isrecursive', 'pformat', 'pprin= t', 'saferepr']

Another useful feature is the "help" function (can be u= sed like "help(pprint)" or just "help()" for interactiv= e usage), which will also provide the documentation for each item in additi= on to just the names.

Chris
--f46d043be1d0b1948304fecfaa72--