python中的pprint.pprint(),类似于print()

下面是我做的demo:

 #python pprint

 '''python API中提供的Sample'''
import json
import pprint
from urllib.request import urlopen with urlopen('http://pypi.python.org/pypi/configparser/json') as url:
http_info = url.info()
raw_data = url.read().decode(http_info.get_content_charset())
project_info = json.loads(raw_data)
result = {'headers' : http_info.items(), 'body' : project_info} pprint.pprint(result) pprint.pprint('#' * 50)
pprint.pprint(result, depth=3) pprint.pprint('#' * 50)
pprint.pprint(result['headers'], width=30) pprint.pprint('#' * 50)
#自定义Demo
test_list = ['a', 'c', 'e', 'd', '']
test_list.insert(0, test_list)
pprint.pprint(test_list)

运行效果:

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
{'body': {'info': {'_pypi_hidden': False,
'_pypi_ordering': 14,
'author': 'Łukasz Langa',
'author_email': 'lukasz@langa.pl',
'bugtrack_url': None,
'cheesecake_code_kwalitee_id': None,
'cheesecake_documentation_id': None,
'cheesecake_installability_id': None,
'classifiers': ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'],
'description': '============\nconfigparser\n============\n\nThe ancient ``ConfigParser`` module available in the standard library 2.x has\nseen a major update in Python 3.2. This is a backport of those changes so that\nthey can be used directly in Python 2.6 - 2.7.\n\nTo use ``configparser`` instead of ``ConfigParser``, simply replace::\n \n import ConfigParser\n\nwith::\n\n import configparser\n\nFor detailed documentation consult the vanilla version at\nhttp://docs.python.org/3/library/configparser.html.\n\nWhy you\'ll love ``configparser``\n--------------------------------\n\nWhereas almost completely compatible with its older brother, ``configparser``\nsports a bunch of interesting new features:\n\n* full mapping protocol access (`more info\n <http://docs.python.org/3/library/configparser.html#mapping-protocol-access>`_)::\n\n >>> parser = ConfigParser()\n >>> parser.read_string("""\n [DEFAULT]\n location = upper left\n visible = yes\n editable = no\n color = blue\n\n [main]\n title = Main Menu\n color = green\n\n [options]\n title = Options\n """)\n >>> parser[\'main\'][\'color\']\n \'green\'\n >>> parser[\'main\'][\'editable\']\n \'no\'\n >>> section = parser[\'options\']\n >>> section[\'title\']\n \'Options\'\n >>> section[\'title\'] = \'Options (editable: %(editable)s)\'\n >>> section[\'title\']\n \'Options (editable: no)\'\n \n* there\'s now one default ``ConfigParser`` class, which basically is the old\n ``SafeConfigParser`` with a bunch of tweaks which make it more predictable for\n users. Don\'t need interpolation? Simply use\n ``ConfigParser(interpolation=None)``, no need to use a distinct\n ``RawConfigParser`` anymore.\n\n* the parser is highly `customizable upon instantiation\n <http://docs.python.org/3/library/configparser.html#customizing-parser-behaviour>`__\n supporting things like changing option delimiters, comment characters, the\n name of the DEFAULT section, the interpolation syntax, etc.\n\n* you can easily create your own interpolation syntax but there are two powerful\n implementations built-in (`more info\n <http://docs.python.org/3/library/configparser.html#interpolation-of-values>`__):\n\n * the classic ``%(string-like)s`` syntax (called ``BasicInterpolation``)\n\n * a new ``${buildout:like}`` syntax (called ``ExtendedInterpolation``)\n \n* fallback values may be specified in getters (`more info\n <http://docs.python.org/3/library/configparser.html#fallback-values>`__)::\n\n >>> config.get(\'closet\', \'monster\',\n ... fallback=\'No such things as monsters\')\n \'No such things as monsters\'\n \n* ``ConfigParser`` objects can now read data directly `from strings\n <http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_string>`__\n and `from dictionaries\n <http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_dict>`__.\n That means importing configuration from JSON or specifying default values for\n the whole configuration (multiple sections) is now a single line of code. Same\n goes for copying data from another ``ConfigParser`` instance, thanks to its\n mapping protocol support. \n\n* many smaller tweaks, updates and fixes\n\nA few words about Unicode\n-------------------------\n\n``configparser`` comes from Python 3 and as such it works well with Unicode.\nThe library is generally cleaned up in terms of internal data storage and\nreading/writing files. There are a couple of incompatibilities with the old\n``ConfigParser`` due to that. However, the work required to migrate is well\nworth it as it shows the issues that would likely come up during migration of\nyour project to Python 3.\n\nThe design assumes that Unicode strings are used whenever possible [1]_. That\ngives you the certainty that what\'s stored in a configuration object is text.\nOnce your configuration is read, the rest of your application doesn\'t have to\ndeal with encoding issues. All you have is text [2]_. The only two phases when\nyou should explicitly state encoding is when you either read from an external\nsource (e.g. a file) or write back. \n\nVersioning\n----------\n\nThis backport is intended to keep 100% compatibility with the vanilla release in\nPython 3.2+. To help maintaining a version you want and expect, a versioning\nscheme is used where:\n\n* the first three numbers indicate the version of Python 3.x from which the\n backport is done\n\n* a backport release number is provided after the ``r`` letter\n\nFor example, ``3.3.0r1`` is the **first** release of ``configparser`` compatible\nwith the library found in Python **3.3.0**.\n\nA single exception from the 100% compatibility principle is that bugs fixed\nbefore releasing another minor Python 3.x.y version **will be included** in the\nbackport releases done in the mean time. This rule applies to bugs only.\n\nMaintenance\n-----------\n\nThis backport is maintained on BitBucket by Łukasz Langa, the current vanilla\n``configparser`` maintainer for CPython:\n\n* `configparser Mercurial repository <https://bitbucket.org/ambv/configparser>`_\n\n* `configparser issue tracker <https://bitbucket.org/ambv/configparser/issues>`_ \n\nChange Log\n----------\n\n3.3.0r2\n~~~~~~~\n\n* updated the fix for `#16820 <http://bugs.python.org/issue16820>`_: parsers\n now preserve section order when using ``__setitem__`` and ``update``\n\n3.3.0r1\n~~~~~~~\n\n* compatible with 3.3.0 + fixes for `#15803\n <http://bugs.python.org/issue15803>`_ and `#16820\n <http://bugs.python.org/issue16820>`_\n\n* fixes `BitBucket issue #4\n <https://bitbucket.org/ambv/configparser/issue/4>`_: ``read()`` properly\n treats a bytestring argument as a filename\n\n* `ordereddict <http://pypi.python.org/pypi/ordereddict>`_ dependency required\n only for Python 2.6\n\n* `unittest2 <http://pypi.python.org/pypi/unittest2>`_ explicit dependency\n dropped. If you want to test the release, add ``unittest2`` on your own.\n\n3.2.0r3\n~~~~~~~\n\n* proper Python 2.6 support\n\n * explicitly stated the dependency on `ordereddict\n <http://pypi.python.org/pypi/ordereddict>`_\n\n * numbered all formatting braces in strings\n\n* explicitly says that Python 2.5 support won\'t happen (too much work necessary\n without abstract base classes, string formatters, the ``io`` library, etc.)\n\n* some healthy advertising in the README\n\n3.2.0r2\n~~~~~~~\n\n* a backport-specific change: for convenience and basic compatibility with the\n old ConfigParser, bytestrings are now accepted as section names, options and\n values. Those strings are still converted to Unicode for internal storage so\n in any case when such conversion is not possible (using the \'ascii\' codec),\n UnicodeDecodeError is raised.\n\n3.2.0r1\n~~~~~~~\n\n* the first public release compatible with 3.2.0 + fixes for `#11324\n <http://bugs.python.org/issue11324>`_, `#11670\n <http://bugs.python.org/issue11670>`_ and `#11858\n <http://bugs.python.org/issue11858>`_.\n\nConversion Process\n------------------\n\nThis section is technical and should bother you only if you are wondering how\nthis backport is produced. If the implementation details of this backport are\nnot important for you, feel free to ignore the following content.\n\n``configparser`` is converted using `3to2 <http://pypi.python.org/pypi/3to2>`_.\nBecause a fully automatic conversion was not doable, I took the following\nbranching approach:\n\n* the ``3.x`` branch holds unchanged files synchronized from the upstream\n CPython repository. The synchronization is currently done by manually copying\n the required files and stating from which CPython changeset they come from.\n\n* the ``3.x-clean`` branch holds a version of the ``3.x`` code with some tweaks\n that make it independent from libraries and constructions unavailable on 2.x.\n Code on this branch still *must* work on the corresponding Python 3.x. You\n can check this running the supplied unit tests.\n\n* the ``default`` branch holds necessary changes which break unit tests on\n Python 3.2. Additional files which are used by the backport are also stored\n here.\n\nThe process works like this:\n\n1. I update the ``3.x`` branch with new versions of files. Commit.\n\n2. I merge the new commit to ``3.x-clean``. Check unit tests. Commit.\n\n3. If there are necessary changes that can be made in a 3.x compatible manner,\n I do them now (still on ``3.x-clean``), check unit tests and commit. If I\'m\n not yet aware of any, no problem.\n\n4. I merge the changes from ``3.x-clean`` to ``default``. Commit.\n\n5. If there are necessary changes that *cannot* be made in a 3.x compatible\n manner, I do them now (on ``default``). Note that the changes should still\n be written using 3.x syntax. If I\'m not yet aware of any required changes,\n no problem.\n\n6. I run ``./convert.py`` which is a custom ``3to2`` runner for this project.\n\n7. I run the unit tests with ``unittest2`` on Python 2.x. If the tests are OK,\n I can prepare a new release. Otherwise, I revert the ``default`` branch to\n its previous state (``hg revert .``) and go back to Step 3.\n\n**NOTE:** the ``default`` branch holds unconverted code. This is because keeping\nthe conversion step as the last (after any custom changes) helps managing the\nhistory better. Plus, the merges are nicer and updates of the converter software\ndon\'t create nasty conflicts in the repository.\n\nThis process works well but if you have any tips on how to make it simpler and\nfaster, do enlighten me :)\n\nFootnotes\n---------\n\n.. [1] To somewhat ease migration, passing bytestrings is still supported but\n they are converted to Unicode for internal storage anyway. This means\n that for the vast majority of strings used in configuration files, it\n won\'t matter if you pass them as bytestrings or Unicode. However, if you\n pass a bytestring that cannot be converted to Unicode using the naive\n ASCII codec, a ``UnicodeDecodeError`` will be raised. This is purposeful\n and helps you manage proper encoding for all content you store in\n memory, read from various sources and write back.\n\n.. [2] Life gets much easier when you understand that you basically manage\n **text** in your application. You don\'t care about bytes but about\n letters. In that regard the concept of content encoding is meaningless.\n The only time when you deal with raw bytes is when you write the data to\n a file. Then you have to specify how your text should be encoded. On\n the other end, to get meaningful text from a file, the application\n reading it has to know which encoding was used during its creation. But\n once the bytes are read and properly decoded, all you have is text. This\n is especially powerful when you start interacting with multiple data\n sources. Even if each of them uses a different encoding, inside your\n application data is held in abstract text form. You can program your\n business logic without worrying about which data came from which source.\n You can freely exchange the data you store between sources. Only\n reading/writing files requires encoding your text to bytes.',
'docs_url': '',
'download_url': 'UNKNOWN',
'home_page': 'http://docs.python.org/3/library/configparser.html',
'keywords': 'configparser ini parsing conf cfg configuration file',
'license': 'MIT',
'maintainer': None,
'maintainer_email': None,
'name': 'configparser',
'package_url': 'http://pypi.python.org/pypi/configparser',
'platform': 'any',
'release_url': 'http://pypi.python.org/pypi/configparser/3.3.0r2',
'requires_python': None,
'stable_version': None,
'summary': 'This library brings the updated configparser from Python 3.2+ to Python 2.6-2.7.',
'version': '3.3.0r2'},
'urls': [{'comment_text': '',
'downloads': 11937,
'filename': 'configparser-3.3.0r2.tar.gz',
'has_sig': False,
'md5_digest': 'dda0e6a43e9d8767b36d10f1e6770f09',
'packagetype': 'sdist',
'python_version': 'source',
'size': 32885,
'upload_time': '2013-01-02T00:58:20',
'url': 'https://pypi.python.org/packages/source/c/configparser/configparser-3.3.0r2.tar.gz'}]},
'headers': [('Date', 'Thu, 15 Aug 2013 06:17:52 GMT'),
('Content-Type', 'application/json; charset="UTF-8"'),
('Content-Disposition', 'inline'),
('Strict-Transport-Security', 'max-age=31536000'),
('Content-Length', ''),
('Accept-Ranges', 'bytes'),
('Age', ''),
('Connection', 'close')]}
'##################################################'
{'body': {'info': {'_pypi_hidden': False,
'_pypi_ordering': 14,
'author': 'Łukasz Langa',
'author_email': 'lukasz@langa.pl',
'bugtrack_url': None,
'cheesecake_code_kwalitee_id': None,
'cheesecake_documentation_id': None,
'cheesecake_installability_id': None,
'classifiers': [...],
'description': '============\nconfigparser\n============\n\nThe ancient ``ConfigParser`` module available in the standard library 2.x has\nseen a major update in Python 3.2. This is a backport of those changes so that\nthey can be used directly in Python 2.6 - 2.7.\n\nTo use ``configparser`` instead of ``ConfigParser``, simply replace::\n \n import ConfigParser\n\nwith::\n\n import configparser\n\nFor detailed documentation consult the vanilla version at\nhttp://docs.python.org/3/library/configparser.html.\n\nWhy you\'ll love ``configparser``\n--------------------------------\n\nWhereas almost completely compatible with its older brother, ``configparser``\nsports a bunch of interesting new features:\n\n* full mapping protocol access (`more info\n <http://docs.python.org/3/library/configparser.html#mapping-protocol-access>`_)::\n\n >>> parser = ConfigParser()\n >>> parser.read_string("""\n [DEFAULT]\n location = upper left\n visible = yes\n editable = no\n color = blue\n\n [main]\n title = Main Menu\n color = green\n\n [options]\n title = Options\n """)\n >>> parser[\'main\'][\'color\']\n \'green\'\n >>> parser[\'main\'][\'editable\']\n \'no\'\n >>> section = parser[\'options\']\n >>> section[\'title\']\n \'Options\'\n >>> section[\'title\'] = \'Options (editable: %(editable)s)\'\n >>> section[\'title\']\n \'Options (editable: no)\'\n \n* there\'s now one default ``ConfigParser`` class, which basically is the old\n ``SafeConfigParser`` with a bunch of tweaks which make it more predictable for\n users. Don\'t need interpolation? Simply use\n ``ConfigParser(interpolation=None)``, no need to use a distinct\n ``RawConfigParser`` anymore.\n\n* the parser is highly `customizable upon instantiation\n <http://docs.python.org/3/library/configparser.html#customizing-parser-behaviour>`__\n supporting things like changing option delimiters, comment characters, the\n name of the DEFAULT section, the interpolation syntax, etc.\n\n* you can easily create your own interpolation syntax but there are two powerful\n implementations built-in (`more info\n <http://docs.python.org/3/library/configparser.html#interpolation-of-values>`__):\n\n * the classic ``%(string-like)s`` syntax (called ``BasicInterpolation``)\n\n * a new ``${buildout:like}`` syntax (called ``ExtendedInterpolation``)\n \n* fallback values may be specified in getters (`more info\n <http://docs.python.org/3/library/configparser.html#fallback-values>`__)::\n\n >>> config.get(\'closet\', \'monster\',\n ... fallback=\'No such things as monsters\')\n \'No such things as monsters\'\n \n* ``ConfigParser`` objects can now read data directly `from strings\n <http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_string>`__\n and `from dictionaries\n <http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_dict>`__.\n That means importing configuration from JSON or specifying default values for\n the whole configuration (multiple sections) is now a single line of code. Same\n goes for copying data from another ``ConfigParser`` instance, thanks to its\n mapping protocol support. \n\n* many smaller tweaks, updates and fixes\n\nA few words about Unicode\n-------------------------\n\n``configparser`` comes from Python 3 and as such it works well with Unicode.\nThe library is generally cleaned up in terms of internal data storage and\nreading/writing files. There are a couple of incompatibilities with the old\n``ConfigParser`` due to that. However, the work required to migrate is well\nworth it as it shows the issues that would likely come up during migration of\nyour project to Python 3.\n\nThe design assumes that Unicode strings are used whenever possible [1]_. That\ngives you the certainty that what\'s stored in a configuration object is text.\nOnce your configuration is read, the rest of your application doesn\'t have to\ndeal with encoding issues. All you have is text [2]_. The only two phases when\nyou should explicitly state encoding is when you either read from an external\nsource (e.g. a file) or write back. \n\nVersioning\n----------\n\nThis backport is intended to keep 100% compatibility with the vanilla release in\nPython 3.2+. To help maintaining a version you want and expect, a versioning\nscheme is used where:\n\n* the first three numbers indicate the version of Python 3.x from which the\n backport is done\n\n* a backport release number is provided after the ``r`` letter\n\nFor example, ``3.3.0r1`` is the **first** release of ``configparser`` compatible\nwith the library found in Python **3.3.0**.\n\nA single exception from the 100% compatibility principle is that bugs fixed\nbefore releasing another minor Python 3.x.y version **will be included** in the\nbackport releases done in the mean time. This rule applies to bugs only.\n\nMaintenance\n-----------\n\nThis backport is maintained on BitBucket by Łukasz Langa, the current vanilla\n``configparser`` maintainer for CPython:\n\n* `configparser Mercurial repository <https://bitbucket.org/ambv/configparser>`_\n\n* `configparser issue tracker <https://bitbucket.org/ambv/configparser/issues>`_ \n\nChange Log\n----------\n\n3.3.0r2\n~~~~~~~\n\n* updated the fix for `#16820 <http://bugs.python.org/issue16820>`_: parsers\n now preserve section order when using ``__setitem__`` and ``update``\n\n3.3.0r1\n~~~~~~~\n\n* compatible with 3.3.0 + fixes for `#15803\n <http://bugs.python.org/issue15803>`_ and `#16820\n <http://bugs.python.org/issue16820>`_\n\n* fixes `BitBucket issue #4\n <https://bitbucket.org/ambv/configparser/issue/4>`_: ``read()`` properly\n treats a bytestring argument as a filename\n\n* `ordereddict <http://pypi.python.org/pypi/ordereddict>`_ dependency required\n only for Python 2.6\n\n* `unittest2 <http://pypi.python.org/pypi/unittest2>`_ explicit dependency\n dropped. If you want to test the release, add ``unittest2`` on your own.\n\n3.2.0r3\n~~~~~~~\n\n* proper Python 2.6 support\n\n * explicitly stated the dependency on `ordereddict\n <http://pypi.python.org/pypi/ordereddict>`_\n\n * numbered all formatting braces in strings\n\n* explicitly says that Python 2.5 support won\'t happen (too much work necessary\n without abstract base classes, string formatters, the ``io`` library, etc.)\n\n* some healthy advertising in the README\n\n3.2.0r2\n~~~~~~~\n\n* a backport-specific change: for convenience and basic compatibility with the\n old ConfigParser, bytestrings are now accepted as section names, options and\n values. Those strings are still converted to Unicode for internal storage so\n in any case when such conversion is not possible (using the \'ascii\' codec),\n UnicodeDecodeError is raised.\n\n3.2.0r1\n~~~~~~~\n\n* the first public release compatible with 3.2.0 + fixes for `#11324\n <http://bugs.python.org/issue11324>`_, `#11670\n <http://bugs.python.org/issue11670>`_ and `#11858\n <http://bugs.python.org/issue11858>`_.\n\nConversion Process\n------------------\n\nThis section is technical and should bother you only if you are wondering how\nthis backport is produced. If the implementation details of this backport are\nnot important for you, feel free to ignore the following content.\n\n``configparser`` is converted using `3to2 <http://pypi.python.org/pypi/3to2>`_.\nBecause a fully automatic conversion was not doable, I took the following\nbranching approach:\n\n* the ``3.x`` branch holds unchanged files synchronized from the upstream\n CPython repository. The synchronization is currently done by manually copying\n the required files and stating from which CPython changeset they come from.\n\n* the ``3.x-clean`` branch holds a version of the ``3.x`` code with some tweaks\n that make it independent from libraries and constructions unavailable on 2.x.\n Code on this branch still *must* work on the corresponding Python 3.x. You\n can check this running the supplied unit tests.\n\n* the ``default`` branch holds necessary changes which break unit tests on\n Python 3.2. Additional files which are used by the backport are also stored\n here.\n\nThe process works like this:\n\n1. I update the ``3.x`` branch with new versions of files. Commit.\n\n2. I merge the new commit to ``3.x-clean``. Check unit tests. Commit.\n\n3. If there are necessary changes that can be made in a 3.x compatible manner,\n I do them now (still on ``3.x-clean``), check unit tests and commit. If I\'m\n not yet aware of any, no problem.\n\n4. I merge the changes from ``3.x-clean`` to ``default``. Commit.\n\n5. If there are necessary changes that *cannot* be made in a 3.x compatible\n manner, I do them now (on ``default``). Note that the changes should still\n be written using 3.x syntax. If I\'m not yet aware of any required changes,\n no problem.\n\n6. I run ``./convert.py`` which is a custom ``3to2`` runner for this project.\n\n7. I run the unit tests with ``unittest2`` on Python 2.x. If the tests are OK,\n I can prepare a new release. Otherwise, I revert the ``default`` branch to\n its previous state (``hg revert .``) and go back to Step 3.\n\n**NOTE:** the ``default`` branch holds unconverted code. This is because keeping\nthe conversion step as the last (after any custom changes) helps managing the\nhistory better. Plus, the merges are nicer and updates of the converter software\ndon\'t create nasty conflicts in the repository.\n\nThis process works well but if you have any tips on how to make it simpler and\nfaster, do enlighten me :)\n\nFootnotes\n---------\n\n.. [1] To somewhat ease migration, passing bytestrings is still supported but\n they are converted to Unicode for internal storage anyway. This means\n that for the vast majority of strings used in configuration files, it\n won\'t matter if you pass them as bytestrings or Unicode. However, if you\n pass a bytestring that cannot be converted to Unicode using the naive\n ASCII codec, a ``UnicodeDecodeError`` will be raised. This is purposeful\n and helps you manage proper encoding for all content you store in\n memory, read from various sources and write back.\n\n.. [2] Life gets much easier when you understand that you basically manage\n **text** in your application. You don\'t care about bytes but about\n letters. In that regard the concept of content encoding is meaningless.\n The only time when you deal with raw bytes is when you write the data to\n a file. Then you have to specify how your text should be encoded. On\n the other end, to get meaningful text from a file, the application\n reading it has to know which encoding was used during its creation. But\n once the bytes are read and properly decoded, all you have is text. This\n is especially powerful when you start interacting with multiple data\n sources. Even if each of them uses a different encoding, inside your\n application data is held in abstract text form. You can program your\n business logic without worrying about which data came from which source.\n You can freely exchange the data you store between sources. Only\n reading/writing files requires encoding your text to bytes.',
'docs_url': '',
'download_url': 'UNKNOWN',
'home_page': 'http://docs.python.org/3/library/configparser.html',
'keywords': 'configparser ini parsing conf cfg configuration file',
'license': 'MIT',
'maintainer': None,
'maintainer_email': None,
'name': 'configparser',
'package_url': 'http://pypi.python.org/pypi/configparser',
'platform': 'any',
'release_url': 'http://pypi.python.org/pypi/configparser/3.3.0r2',
'requires_python': None,
'stable_version': None,
'summary': 'This library brings the updated configparser from Python 3.2+ to Python 2.6-2.7.',
'version': '3.3.0r2'},
'urls': [{...}]},
'headers': [('Date', 'Thu, 15 Aug 2013 06:17:52 GMT'),
('Content-Type', 'application/json; charset="UTF-8"'),
('Content-Disposition', 'inline'),
('Strict-Transport-Security', 'max-age=31536000'),
('Content-Length', ''),
('Accept-Ranges', 'bytes'),
('Age', ''),
('Connection', 'close')]}
'##################################################'
[('Date',
'Thu, 15 Aug 2013 06:17:52 GMT'),
('Content-Type',
'application/json; charset="UTF-8"'),
('Content-Disposition',
'inline'),
('Strict-Transport-Security',
'max-age=31536000'),
('Content-Length', ''),
('Accept-Ranges', 'bytes'),
('Age', ''),
('Connection', 'close')]
'##################################################'
[<Recursion on list with id=39183984>, 'a', 'c', 'e', 'd', '']
>>>

python开发_pprint()的更多相关文章

  1. python开发环境搭建

    虽然网上有很多python开发环境搭建的文章,不过重复造轮子还是要的,记录一下过程,方便自己以后配置,也方便正在学习中的同事配置他们的环境. 1.准备好安装包 1)上python官网下载python运 ...

  2. 【Machine Learning】Python开发工具:Anaconda+Sublime

    Python开发工具:Anaconda+Sublime 作者:白宁超 2016年12月23日21:24:51 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现 ...

  3. Python开发工具PyCharm个性化设置(图解)

    Python开发工具PyCharm个性化设置,包括设置默认PyCharm解析器.设置缩进符为制表符.设置IDE皮肤主题等,大家参考使用吧. JetBrains PyCharm Pro 4.5.3 中文 ...

  4. Python黑帽编程1.2 基于VS Code构建Python开发环境

    Python黑帽编程1.2  基于VS Code构建Python开发环境 0.1  本系列教程说明 本系列教程,采用的大纲母本为<Understanding Network Hacks Atta ...

  5. Eclipse中Python开发环境搭建

    Eclipse中Python开发环境搭建  目 录  1.背景介绍 2.Python安装 3.插件PyDev安装 4.测试Demo演示 一.背景介绍 Eclipse是一款基于Java的可扩展开发平台. ...

  6. Python开发:环境搭建(python3、PyCharm)

    Python开发:环境搭建(python3.PyCharm) python3版本安装 PyCharm使用(完全图解(最新经典))

  7. Python 开发轻量级爬虫08

    Python 开发轻量级爬虫 (imooc总结08--爬虫实例--分析目标) 怎么开发一个爬虫?开发一个爬虫包含哪些步骤呢? 1.确定要抓取得目标,即抓取哪些网站的哪些网页的哪部分数据. 本实例确定抓 ...

  8. Python 开发轻量级爬虫07

    Python 开发轻量级爬虫 (imooc总结07--网页解析器BeautifulSoup) BeautifulSoup下载和安装 使用pip install 安装:在命令行cmd之后输入,pip i ...

  9. Python 开发轻量级爬虫06

    Python 开发轻量级爬虫 (imooc总结06--网页解析器) 介绍网页解析器 将互联网的网页获取到本地以后,我们需要对它们进行解析才能够提取出我们需要的内容. 也就是说网页解析器是从网页中提取有 ...

随机推荐

  1. Codeforces 665E. Beautiful Subarrays (字典树)

    题目链接:http://codeforces.com/problemset/problem/665/E (http://www.fjutacm.com/Problem.jsp?pid=2255) 题意 ...

  2. 背包DP FOJ 2214

    题目:http://acm.fzu.edu.cn/problem.php?pid=2214 (http://www.fjutacm.com/Problem.jsp?pid=2053) 这题看起来是一题 ...

  3. 浅析linux内核中timer定时器的生成和sofirq软中断调用流程(转自http://blog.chinaunix.net/uid-20564848-id-73480.html)

    浅析linux内核中timer定时器的生成和sofirq软中断调用流程 mod_timer添加的定时器timer在内核的软中断中发生调用,__run_timers会spin_lock_irq(& ...

  4. React 16 源码瞎几把解读 【前戏】 为啥组件外面非得包个标签?

    〇.看前准备 1.自行clone react最新代码 2.自行搭建一个能跑react的test项目 一.看表面:那些插件 如何解析JSX 有如下一段代码: // ---- hearder.jsx 组件 ...

  5. Oracle-AWR报告简介及如何生成【转】

    AWR报告 awr报告是oracle 10g及以上版本提供的一种性能收集和分析工具,它能提供一个时间段内整个系统资源使用情况的报告,通过这个报告,我们就可以了解Oracle数据库的整个运行情况,比如硬 ...

  6. Python抽象类和接口类

    一.抽象类和接口类 继承有两种用途: 一:继承基类的方法,并且做出自己的改变或者扩展(代码重用) 二:声明某个子类兼容于某基类,定义一个接口类Interface,接口类中定义了一些接口名(就是函数名) ...

  7. vsftpd.conf 详解

    //不允许匿名访问 anonymous_enable=NO //设定本地用户可以访问.注意:主要是为虚拟宿主用户,如果该项目设定为NO那么所有虚拟用户将无法访问 local_enable=YES // ...

  8. 在ubuntu 上安装pycharm

    1.首先在官网下载pycharm并进行提取,将提取的文件夹放在/usr下面(或者任意位置) 2.然后vi /etc/hosts 编辑 将0.0.0.0 account.jetbrains.com添加到 ...

  9. scrollreveal(页面滚动显示动画插件支持手机)

    scrollreveal.js是一款可以轻易实现桌面和移动浏览器元素随页面滚动产生动画的js插件.该插件通过配置可以在页面滚动,元素进入视口时产生炫酷的动画效果,同时还支持元素的3D效果,非常的实用. ...

  10. Delphi XE增强的RTTI妙用--动态创建包中的窗口类

    以前要在运行时创建package中的form类,必须要在form单元文件中这样注册类: Initialization  RegisterClass(TForm3);Finalization  UnRe ...