Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-93096: Update and documentpickle CLI#131097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 17 commits intopython:mainfromdonbarbos:issue-93096-pickle-cli-docs
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from3 commits
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
f572b59
Add CLI docs for `pickle`
donbarbosMar 11, 2025
923af7b
Correct ref preview
donbarbosMar 11, 2025
5909db4
Update Doc/library/pickle.rst
donbarbosMar 12, 2025
291f6bf
Add suggestions
donbarbosMar 13, 2025
215afa9
Fix typo
donbarbosMar 13, 2025
3b8efae
Update doc
donbarbosMar 13, 2025
40a3265
Fix pickle parser
donbarbosMar 13, 2025
c93b70f
Add feature
donbarbosMar 13, 2025
cefd8a4
Update Doc/library/pickle.rst
donbarbosMar 13, 2025
4bc3253
Move cli section
donbarbosMar 13, 2025
29d1360
Update Doc/library/pickle.rst
donbarbosMar 14, 2025
3dd66f2
Update Lib/pickle.py
donbarbosMar 14, 2025
ff22e97
back sort_dicts=True
donbarbosMar 14, 2025
dbedc68
pprint.pp(obj)
hugovkMar 14, 2025
756ff98
Merge branch 'main' into issue-93096-pickle-cli-docs
donbarbosMar 14, 2025
593fd7b
Revert using pp
donbarbosMar 14, 2025
8f1af6e
Update Lib/pickle.py
donbarbosMar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionDoc/library/cmdline.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@ The following modules have a command-line interface.
* :ref:`json <json-commandline>`
* :mod:`mimetypes`
* :mod:`pdb`
* :mod:`pickle`
* :ref:`pickle <pickle-cli>`
* :ref:`pickletools <pickletools-cli>`
* :mod:`platform`
* :mod:`poplib`
Expand Down
24 changes: 24 additions & 0 deletionsDoc/library/pickle.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -511,6 +511,30 @@ The :mod:`pickle` module exports three classes, :class:`Pickler`,
Release the underlying buffer exposed by the PickleBuffer object.


.. _pickle-cli:

Command-line interface
----------------------

The :mod:`pickle` module can be invoked as a script from the command line,
it will display contents of the pickle files. However, when the pickle file
that you want to examine comes from an untrusted source, ``-m pickletools``
is a safer option because it does not execute pickle bytecode, see
:ref:`pickletools CLI usage <pickletools-cli>`.

.. code-block:: bash

python -m pickle [pickle_file ...]

The following options are accepted:

.. program:: pickle

.. option:: pickle_file

The pickle file(s).


.. _pickle-picklable:

What can be pickled and unpickled?
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp