[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread Anne Moroney

New submission from Anne Moroney:

In trying to test the new feature in 3.6.0, 
$ python -VV  # get more info than python -V or python --version 
I found several oddities. 

1.On both  Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, using 
lowercase v's causes a crash on some kind of import.

1a.AWS first lines are:
[ec2-user@ip-172-31-2-101 ~]$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib64/python2.7/site.pyc matches /usr/lib64/python2.7/site.py
import site # precompiled from /usr/lib64/python2.7/site.pyc

1b.Conda first lines are:
(py36aws)me:tool-aws me$ python -v
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # 
//etc 

1c.In both cases, after lots of stuff, must quit python with 
quit()

2.Anaconda does not provide more information. Is that expected?
(py36aws) $ python -VV
Python 3.6.0 :: Continuum Analytics, Inc.
(py36aws)$ python -V
Python 3.6.0 :: Continuum Analytics, Inc.
(py36aws)$ python --version
Python 3.6.0 :: Continuum Analytics, Inc.

--
assignee: docs@python
components: Documentation
messages: 289561
nosy: AnneTheAgile, docs@python
priority: normal
severity: normal
status: open
title: Requesting version info with lowercase -v or -vv causes an import crash
type: crash
versions: Python 2.7, Python 3.6

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29806>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-18 Thread Anne Moroney

Anne Moroney added the comment:

This ticket's patch appears to have already been merged, yet it is open? 

On 2.7.9 docs [1], it has the exact language. The tutorial page [2] has a nice 
description as well. Finding this ticket really helped me understand argparse a 
bit better, and now I vote to close :).
AnneTheAgile, inspired by CodeTriage

1.[] ; ; ; ; ; ; ; ; ; ;  X.15.4. argparse — Parser for command-line options, 
arguments and sub-commands — Python 2.7.9 documentation
https://docs.python.org/2/library
action - The basic type of action to be taken when this argument is encountered 
at the command line.

2.[] ; ; ; ; ; ; ; ; ; ;  X.Argparse Tutorial — Python 2.7.9 documentation
https://docs.python.org/2/howto/argparse.html
we now specify a new keyword, action, and give it the value store_true. This 
means that, if the option is specified, assign the value True to args.verbose. 
Not specifying it implies False.

3.[] ; ;List of all types of 'action', including customizable ; ; ; ; ; ; ; ;  
X.15.4. argparse — Parser for command-line options, arguments and sub-commands 
— Python 2.7.9 documentation
https://docs.python.org/2/library/argparse.html#action
action=store_true
action='store_false'
action=count
action='store_const'
action='append'
action='version'
action=CustomFooAction

--
nosy: +AnneTheAgile

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com