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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make python-m pickletools do something useful #53340
Comments
Attached patch makes python -m pickletools <picklefile> print symbolic disassembly of a pickle to stdout. If the idea is well received, I will add help option, usage string and possibly -o option to redirect output to a file. I am not sure that current "run doctest" behavior is worth preserving given that one can always do python -m doctest Lib/pickletools.py instead. |
Good idea! You can remove the doctest behavior. I don't think it is useful. But if you remove it, make sure you add an usage message when no argument is given. |
Well, assuming you want to make it useful, I'd make that behaviour depend on a command-line option, such that other actions can be added later. |
OK, Antoine, you asked for it. :-) bpo-9094.diff |
I would like to commit this. Any objections? Changes only affect running pickletools as __main__. Does this need to be documented in pickletools.rst? I noticed that dis.rst does not describe running dis.py from command line. Similarly, I cannot find tests for any module's command line behavior to base -m pickletools testing on. |
In 'run self-test suit', I suppose you mean 'suite'. |
Committed in r82514. I don't think this appropriate for 3.1, but will not block it yet if someone thinks it should be merged. |
On the second thought, this is clearly not a bug fix. Not a backport candidate. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: