Hello,
In the context of a move for hosting of my one recto-verso pdf cheat
sheet, I updated it to add Python's news stuff and make a new 2.1.0
version (latest version, 2.0.6, was from 2017).
DOWNLOAD
English version is at https://py3cheatsheet.lisn.fr/
(its a short URL fore
Yes,
I have 24.3.1 version of pip in my win 11 device, there is a new version of
pip available, 25.0.1
Shall I upgrade that?
Kind regards,
Praveen
On Mon, 10 Mar 2025, 03:04 Thomas Passin via Python-list, <
python-list@python.org> wrote:
> On 3/9/2025 3:16 PM, Gilmeh Serda via Py
Is that an approved location for executables?
May I know? What do you mean by approved location?
Kind regards,
Praveen
On Mon, 10 Mar 2025, 01:25 Gilmeh Serda via Python-list, <
python-list@python.org> wrote:
> On Sat, 8 Mar 2025 15:59:51 +0530, Praveen Kumar wrote:
>
> > "C:\Users\Bharath\AppD
running
python and python --version with admin and all those executables, anyway it
works really well.
(Finally The all issues stand resolved.)
Thank you for support matt and team,
I'm really thankful for your attention to this matter.
Kind regards,
Praveen
On Mon, 10 Mar 2025, 20:42 Pr
these are seem to be corrupted to me, then after I tried running
python and python --version with admin and all those executables, anyway it
works really well.
(Finally The all issues stand resolved.)
Thank you for support matt and team,
I'm really thankful for your attention to this matter
, though, try to run python using the absolute path you have just
found.
BTW, it's always a good idea to run pip using the python install that
you will be running. So if "python" runs the right version, then invoke
pip this way:
python -m pip
If you use the launcher, then:
py
ant you to be assisted
> > in resolving
> > > this following issue. kindly look at the below concern,
> > >
> > > """I’m running into an error where I get a 'This app can’t
> > run on your PC'
&
run on your PC'
> pop-up with (Access is Denied error) whenever I try to run
the Python
> version (python --version) or run python.exe in the Command
Prompt on
> Windows 11."""
>
>
> *Here’
y look at the below concern,
> >
> > """I’m running into an error where I get a 'This app can’t run on your
> PC'
> > pop-up with (Access is Denied error) whenever I try to run the Python
> > version (python --version) or run python.exe in the Command
he below concern,
>
> """I’m running into an error where I get a 'This app can’t run on your PC'
> pop-up with (Access is Denied error) whenever I try to run the Python
> version (python --version) or run python.exe in the Command Prompt on
> Windows 11."&
>
>> > I hope this email finds you well, I want you to be assisted in resolving
>> > this following issue. kindly look at the below concern,
>> >
>> > """I’m running into an error where I get a 'This app can’t run on your
>> PC'
>&g
can’t run on your PC'
pop-up with (Access is Denied error) whenever I try to run the Python
version (python --version) or run python.exe in the Command Prompt on
Windows 11."""
*Here’s what I’ve tried so far:*
*Uninstalled python software from the apps settings and reins
or) whenever I try to run the Python
version (python --version) or run python.exe in the Command Prompt on
Windows 11."""
*Here’s what I’ve tried so far:*
*Uninstalled python software from the apps settings and reinstalled python
software from the official python.org site
*Add
On Tue, 11 Feb 2025 at 05:56, Grant Edwards via Python-list
wrote:
> The -dev packages also contain the man pages for the libraries. It
> surprised me at first that the man pages weren't installed by the
> "normal" lib packages. But, if you're not writing/building apps that
> link with library X,
On 2025-02-10, Chris Angelico via Python-list wrote:
> On Tue, 11 Feb 2025 at 04:04, Grant Edwards via Python-list
> wrote:
>> On 2025-02-09, Left Right via Python-list wrote:
>>
>>> You need the sources of the OpenSSL library, not the compiled library.
>>> On Ubuntu, the packages with sources
On Tue, 11 Feb 2025 at 04:04, Grant Edwards via Python-list
wrote:
>
> On 2025-02-09, Left Right via Python-list wrote:
>
> > You need the sources of the OpenSSL library, not the compiled library.
> > On Ubuntu, the packages with sources are typically named xxx-dev where
> > xxx is the package th
On 2025-02-09, Left Right via Python-list wrote:
> You need the sources of the OpenSSL library, not the compiled library.
> On Ubuntu, the packages with sources are typically named xxx-dev where
> xxx is the package that provides the library. I don't have a Ubuntu
> currently, but try looking for
'm on a new machine with a fresh install of Ubuntu 24.04 wich embed Python
> 3.12.3, no problem with that.
>
> As I'm maintainer of some Python modules published on PyPI, I've the
> habit of testing my modules in different virtual environments. For now
> Python 3.11, 3.12 a
on requires a OpenSSL 1.1.1 or newer
> --------
>
> But I have a more newer version:
>
> -------
> $ openssl version
> OpenSS
> Thanks Jason, I have near the same result of you.
> I need to explain the context.
> I'm on a new machine with a fresh install of Ubuntu 24.04 wich embed Python
> 3.12.3, no problem with that.
>
> As I'm maintainer of some Python modules published on PyPI, I've the ha
shed on PyPI, I've the habit of
testing my modules in different virtual environments. For now Python 3.11, 3.12
and 3.13.
So, I've maybe found a solution:
I've create in my home a dir named /opt, download into it the latest version of
openssl-1.1.1 and uncompress it.(*)
--
on requires a OpenSSL 1.1.1 or newer
>
> --------
>
> But I have a more newer version:
>
>
> -------
> $ openssl version
>
dépendances... Fait
Lecture des informations d'état... Fait
libssl-dev est déjà la version la plus récente (3.0.13-0ubuntu3.4).
In english: "libssl-dev is already the most recent version (3.0.13-0ubuntu3.4).
Vi
gt; Python requires a OpenSSL 1.1.1 or newer
> --------
>
> But I have a more newer version:
>
> ------
But I have a more newer version:
---
$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024
brary, but the Pure Python
version throws errors at compile time and although the Cython version
compiles, it doesn't work.
Before giving details, just checking first if anyone can simply point
to a set of files, preferably Pure Python but failing that Cython,
that actually work for them.
Yo
queue.py library, but the Pure Python
> version throws errors at compile time and although the Cython version
> compiles, it doesn't work.
>
> Before giving details, just checking first if anyone can simply point
> to a set of files, preferably Pure Python but failing that Cyth
I've spent several days trying to get this example [1] working, using
Python3.11 and Cython 3.0.11 of Debian.
I've copied the example files as carefully as I can, renamed some to
avoid a name clash with the queue.py library, but the Pure Python
version throws errors at compile time an
What Changed?=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.
Brief summary:
* Fix #242: Handle exceptions in the `on_data` callable.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY)
Fingerprint: CA74 9
What Changed?=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.
Brief summary:
- * Fix #117: Add WKD (Web Key Directory) support for auto-locating keys.
Thanks to Myzel394 for the patch.
* Fix #237: Ensure local variable is initialized eve
umPy versions installed at the same time, although only one
will be available to the Python process (note that this means that
sub-processes created in this Python process won't necessarily have
the same version of NumPy!). To make matters worse, it's common for
Anaconda users to use pip t
On 2024-05-15 19:42, Popov, Dmitry Yu via Python-list wrote:
What would be the easiest way to learn which version of NumPy I have with my
Anaconda distribution?
Import numpy and print its '__version__' attribute.
--
https://mail.python.org/mailman/listinfo/python-list
Thank you.
From: Larry Martell
Sent: Wednesday, May 15, 2024 1:55 PM
To: Popov, Dmitry Yu
Cc: Popov, Dmitry Yu via Python-list
Subject: Re: Version of NymPy
On Wed, May 15, 2024 at 2: 43 PM Popov, Dmitry Yu via Python-list wrote: > > What would be the e
On Wed, May 15, 2024 at 2:43 PM Popov, Dmitry Yu via Python-list
wrote:
>
> What would be the easiest way to learn which version of NumPy I have with my
> Anaconda distribution?
>>> import numpy
>>> numpy.__version__
'1.24.4'
--
https://mail.python.org/mailman/listinfo/python-list
What would be the easiest way to learn which version of NumPy I have with my
Anaconda distribution?
--
https://mail.python.org/mailman/listinfo/python-list
What Changed?=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.
Brief summary:
* Fix #228: Clarify documentation for encryption/decryption.
* Make I/O buffer size configurable via buffer_size attribute on a GPG instance.
This release [2] has been
mya.G via Python-list"
Date: 10/10/23 04:43 (GMT+10:00) To:
python-list@python.org Subject: regarding installation of python version
The problem is how many times I have uninstalled the python version but
always it is showing the same version after the installation of new
v
I can help you
On Mon, 9 Oct 2023, 11:15 pm Thri sowmya.G via Python-list, <
python-list@python.org> wrote:
>
>
>The problem is how many times I have uninstalled the python version but
>always it is showing the same version after the installation of new
>ver
The problem is how many times I have uninstalled the python version but
always it is showing the same version after the installation of new
version too .But in all control panel and file explorer at everywhere the
system showing that the old version got uninstalled but
nt to convert a small project it's usually not too hard; and using
a conversion tool can work well.
Just remember that Python 2.7.18, the very last version of Python 2,
was released in 2020 and has not changed since. There are not even
security patches being released (at least, not from python.or
t's usually not too hard; and using
> > a conversion tool can work well.
> Just remember that Python 2.7.18, the very last version of Python 2,
> was released in 2020 and has not changed since. There are not even
> security patches being released (at least, not from python.org
ython 2.7.18, the very last version of Python 2,
was released in 2020 and has not changed since. There are not even
security patches being released (at least, not from python.org - but
if you're using a different distribution of Python, you are also quite
possibly using their package manager rat
On 9/27/23 14:02, Zuri Shaddai Kuchipudi via Python-list wrote:
Why it's trying to select an incompatible version when you ask to
upgrade is not something I'd like to speculate on, for me personally
that's a surprise. Maybe something else you did before?
Also make sure you'
> > C:\repository\pst-utils-pc-davinci-simulator>pip install
> > You are using pip version 7.0.1, however version 23.2.1 is available.
> > You should consider upgrading via the 'pip install --upgrade pip' command.
> > You must give at least one requirement to in
On 9/27/23 05:17, Zuri Shaddai Kuchipudi via Python-list wrote:
hello everyone this the error that im getting while trying to install and
upgrade pip on what is the solution for it?
C:\repository\pst-utils-pc-davinci-simulator>pip install
You are using pip version 7.0.1, however version 23.
On Thu, 28 Sept 2023 at 01:16, Zuri Shaddai Kuchipudi via Python-list
wrote:
>
> hello everyone this the error that im getting while trying to install and
> upgrade pip on what is the solution for it?
>
The solution is to upgrade to Python 3.
https://pip.pypa.io/en/latest/development/release-pr
On 9/27/2023 7:17 AM, Zuri Shaddai Kuchipudi via Python-list wrote:
hello everyone this the error that im getting while trying to install and
upgrade pip on what is the solution for it?
C:\repository\pst-utils-pc-davinci-simulator>pip install
You are using pip version 7.0.1, however vers
hello everyone this the error that im getting while trying to install and
upgrade pip on what is the solution for it?
C:\repository\pst-utils-pc-davinci-simulator>pip install
You are using pip version 7.0.1, however version 23.2.1 is available.
You should consider upgrading via the 'pip
On 2023-07-22 at 11:04:35 +,
Vinay Sajip via Python-list wrote:
> What Changed?
> =
What changed, indeed.
Maybe I'm old, and curmudgeonly, but it would be nice if the body of
these annoucement emails (not just this one) contained the name of the
program and a one-line summary of
specific.
* Fix #217: Use machine-readable interface to query the gpg version.
* Added the ability to export keys to a file.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY)
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86
Recent changes to PyP
On 5/5/23 04:39, c.bu...@posteo.jp wrote:
That being said, the git repo linked earlier has accepted commits to
that file earlier this year. So read in to that what you will *shrugs*
--
https://mail.python.org/mailman/listinfo/python-list
ommands
Manual PYGETTEXT(1)
NAME
pygettext - Python equivalent of xgettext(1)
SYNOPSIS
pygettext [OPTIONS] INPUTFILE ...
DESCRIPTION
pygettext is deprecated. The current version of xgettext
supports many languages, including Python.
pygettext uses Py
Thanks for the answer.
Am 05.05.2023 03:24 schrieb aapost:
pygettext is deprecated since xgettext supports python now, so using
xgettext is recommended.
If this is the official case then it should be mentioned in the python
docs. The 3.11 docs still tell about pygettext and xgettext and don't
On 5/4/23 17:38, c.bu...@posteo.jp wrote:
am I right to assume that "pygettext" is part of the official Python3
"package"? So it is OK to aks here?
How can I set the "Project-Id-Version"? With "xgettext" I would use the
arguments "--package-name&q
On 04/05/2023 22:38, c.bu...@posteo.jp wrote:
> Hello,
>
> am I right to assume that "pygettext" is part of the official Python3
> "package"? So it is OK to aks here?
>
No it doesn't appear to be. It is not listed in the standard library.
It is mentioned in the documentation for gettext which i
s create in each
po-file.
How can I set the "Project-Id-Version"? With "xgettext" I would use the
arguments "--package-name" and "--package-version" for this but they are
unknown for "pygettext".
Kind
Christian
--
https://mail.python.org/mailman/listinfo/python-list
So I disabled the manage app execution for python 3.10, created the py.ini
file and executed setx.exe PY_PYTHON 3.8,setx.exe PY_PYTHON3 3.8.
After that i uninstalled 3.8 and reinstalled and now the version is showing
correctly.
Thanks everyone for the help.
Thanks
Sumeet
On Sat, 1 Apr
On 4/1/23, Barry Scott wrote:
>
> I find user environment on windows to be less flexible to work with then
> adding a py.ini. On my Windows 11 I added
> %userprofile%\AppData\Local\py.ini.
> To make python 3.8 the default that py.exe uses put this in py.ini:
>
> [defaults]
> python=3.8-64
> python
Am 29.03.2023 um 18:46 schrieb Pranav Bhardwaj:
Dear sir,
I am Pranav Bhardwaj and I stuck in a problem. My problem is
that in my system I have python 3.11.2 but when I type python in my command
prompt, my command prompt show that python version 2.7.13 as a default. And
I can
> On 31 Mar 2023, at 22:02, Eryk Sun wrote:
>
>
> The OP installed the standard Python 3.8 distribution, which does
> install the launcher by default. The launcher can run all installed
> versions, including store app installations. By default it runs the
> highest ava
exe", "pip3.11.exe", etc. But without the
launcher there's no shebang support for scripts, so you can't easily
associate a script with a particular Python version or a particular
virtual environment. Shell shortcuts/links (.LNK files) can work
around the lack of shebang sup
On 3/31/2023 2:18 PM, Eryk Sun wrote:
On 3/31/23, Sumeet Firodia wrote:
One more thing is that pip --version also refers to python 3.10
C:\Users\admin>pip --version
pip 23.0.1 from
C:\Users\admin\AppData\Local\Packages
\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0
\LocalCache\lo
On 3/31/23, Sumeet Firodia wrote:
>
> One more thing is that pip --version also refers to python 3.10
>
> C:\Users\admin>pip --version
> pip 23.0.1 from
> C:\Users\admin\AppData\Local\Packages
> \PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0
> \LocalCache\lo
On 3/31/2023 8:27 AM, Sumeet Firodia wrote:
Hi Barry,
This is getting more complicated.
As per the command you shared, below is the output
C:\Users\admin>py -3.8 -m pip --version
pip 19.2.3 from
C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\site-packages\pip
(python 3.8)
For
Hi Barry,
This is getting more complicated.
As per the command you shared, below is the output
C:\Users\admin>py -3.8 -m pip --version
pip 19.2.3 from
C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\site-packages\pip
(python 3.8)
For pip --version below is the output
C:\Users\ad
> On 31 Mar 2023, at 09:33, Sumeet Firodia wrote:
>
> Thanks Barry.
>
> One more thing is that pip --version also refers to python 3.10
>
> C:\Users\admin>pip --version
> pip 23.0.1 from
> C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python
Thanks Barry.
One more thing is that pip --version also refers to python 3.10
C:\Users\admin>pip --version
pip 23.0.1 from
C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip
(python 3.10)
The issue h
On 3/30/2023 10:17 AM, Sumeet Firodia wrote:
Hi Team,
I have installed Python 3.8 for Snowpark but when I check the version in
command prompt it shows me Python 3.10.10.
C:\Users\admin>python --version
Python 3.10.10
Also when I try to uninstall 3.10 it says no such version is installed.
> On 30 Mar 2023, at 15:17, Sumeet Firodia wrote:
>
>>
>> Hi Team,
>>
>> I have installed Python 3.8 for Snowpark but when I check the version in
>> command prompt it shows me Python 3.10.10.
>>
>> C:\Users\admin>python --version
>>
>
> Hi Team,
>
> I have installed Python 3.8 for Snowpark but when I check the version in
> command prompt it shows me Python 3.10.10.
>
> C:\Users\admin>python --version
> Python 3.10.10
>
> Also when I try to uninstall 3.10 it says no such version is installed.
On 3/29/23 10:46, Pranav Bhardwaj wrote:
Dear sir,
I am Pranav Bhardwaj and I stuck in a problem. My problem is
that in my system I have python 3.11.2 but when I type python in my command
prompt, my command prompt show that python version 2.7.13 as a default. And
I can't be
On 3/29/23, Pranav Bhardwaj wrote:
>I am Pranav Bhardwaj and I stuck in a problem. My problem is
> that in my system I have python 3.11.2 but when I type python in my command
> prompt, my command prompt show that python version 2.7.13 as a default.
Run the following c
On 3/29/2023 12:46 PM, Pranav Bhardwaj wrote:
Dear sir,
I am Pranav Bhardwaj and I stuck in a problem. My problem is
that in my system I have python 3.11.2 but when I type python in my command
prompt, my command prompt show that python version 2.7.13 as a default. And
I can'
Dear sir,
I am Pranav Bhardwaj and I stuck in a problem. My problem is
that in my system I have python 3.11.2 but when I type python in my command
prompt, my command prompt show that python version 2.7.13 as a default. And
I can't be able to find python 2.7.13 in my system i
this is a dirty
fix.--(Unsigned mail from my phone)
Original message From: pranavbhardwaj...@gmail.com Date:
29/3/23 02:43 (GMT+10:00) To: Python-list@python.org Subject: found older
version of python in my command prompt Sent from [1]Mail for Windows
Dear sir,
> On 28 Mar 2023, at 16:44, pranavbhardwaj...@gmail.com wrote:
>
>
>
>
>
> Sent from [1]Mail for Windows
>
> Dear sir,
>
> I am Pranav Bhardwaj and I am facing issue regarding python
> version. When I try to open python
Sent from [1]Mail for Windows
Dear sir,
I am Pranav Bhardwaj and I am facing issue regarding python
version. When I try to open python in my command prompt, I see there is
very older version in it that is python 2.7.13 as a default version. I
want to
t;credits" or "license" for more information.
> >>>> import sqlite3
> >>>> sqlite3.sqlite_version
> > '3.34.0'
> >>>>
> >
> > As you can see, the SQlite3 version installed is v3.34.0. Right now,
> > the version
On 2023-02-15 5:59 AM, Thomas Passin wrote:
>
> "Download the latest release from http://www.sqlite.org/download.html
> and manually copy sqlite3.dll into Python's DLLs subfolder."
>
I have done exactly this a number of times and it has worked for me.
Frank Millman
--
https://m
AMD64)] on win32
and the sqlite_version is 3.39.4
Thanks, previous to v3.40.1, the released version was v.3.39.4. I wish
it was that one that one. :-)
I haven't tried it but this may help:
https://stackoverflow.com/questions/61091438/how-to-upgrade-sqlite3-version-in-windows-10
"Down
gt; and the sqlite_version is 3.39.4
Thanks, previous to v3.40.1, the released version was v.3.39.4. I wish
it was that one that one. :-)
--
What if eternity is real? H...
--
https://mail.python.org/mailman/listinfo/python-list
,
$ python
Python 3.9.10 (main, Jan 20 2022, 21:37:52) [GCC 11.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
import sqlite3
sqlite3.sqlite_version
'3.34.0'
As you can see, the SQlite3 version installed is v3.34.0
11.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.34.0'
>>>
As you can see, the SQlite3 version installed is v3.34.0. Right now,
On 1/26/23, Olivier B. wrote:
>
> Does someone know why it would have been chosen to be different for
> debug builds?
It's assumed that a debug build would normally link with
"pythonXY_d.dll". Maybe it should be more defensive. Refer to the
following setup in PC/pyconfig.h:
/* For an MSVC DL
the swig python/c++ module, i get a
"Module use of python3_d.dll conflicts with this version of Python". I
checked that i am properly loading the python3_d.dll of my python37,
and python python37_d.dll too
Looking in dynload_win.c of python sources where the message is
triggered, in
DFS writes:
> On 12/14/2022 3:55 AM, Cecil Westerhof wrote:
>> If I want to know the dependencies for requests I use:
>> pip show requests
>> And one of the lines I get is:
>> Requires: certifi, charset-normalizer, idna, urllib3
>> But I want (in t
On 12/14/2022 3:55 AM, Cecil Westerhof wrote:
If I want to know the dependencies for requests I use:
pip show requests
And one of the lines I get is:
Requires: certifi, charset-normalizer, idna, urllib3
But I want (in this case) to know with version of charset-normalizer
requests
If I want to know the dependencies for requests I use:
pip show requests
And one of the lines I get is:
Requires: certifi, charset-normalizer, idna, urllib3
But I want (in this case) to know with version of charset-normalizer
requests needs.
How do I get that?
--
Cecil Westerhof
Senior
On Tue, 29 Nov 2022 at 12:37, Loris Bennett wrote:
>
> Mats Wichmann writes:
>
> > On 11/27/22 16:40, Skip Montanaro wrote:
> >> I have a script to which I'd like to add a --version flag. It should print
> >> the version number then exit, much in the sam
On Sun, 27 Nov 2022 22:23:16 -0600, Karen Park declaimed
the following:
>I figured it out…there was a logistics file given with the assignment! I
>thought it was supposed to be a download included with the python
>download…oops!
>
I think you made this response in the wrong thread...
Mats Wichmann writes:
> On 11/27/22 16:40, Skip Montanaro wrote:
>> I have a script to which I'd like to add a --version flag. It should print
>> the version number then exit, much in the same way --help prints the help
>> text then exits. I haven't been able to
Thanks. It occurs to me that instead of providing two special actions
("help" and "version"), it might be worthwhile to provide a standard way of
saying, "if present, process this option and exit before considering other
details of the command line." Matt's exam
More better:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("positional",type=int)
parser.add_argument('--version',action="version",version="2.0")
args = parser.parse_args()
# double argument
print(args.positional * 2)
From: Pyt
s, but have you checked the documentation? this
>> case is supported using an action named 'version' without doing very much.
>>
>
> Thanks, Mats.
>
> I actually searched all over the argparse docs. (There's a lot to digest.
> Honestly, if I wasn't
>
> ummm, hate to say this, but have you checked the documentation? this
> case is supported using an action named 'version' without doing very much.
>
Thanks, Mats.
I actually searched all over the argparse docs. (There's a lot to digest.
Honestly, if I wasn'
Use two parsers:
import argparse
import sys
vparser = argparse.ArgumentParser(add_help=False)
vparser.add_argument('--version',action="store_true",help="show version")
# look for version, ignore remaining arguments
vargs, _ = vparser.parse_known_args()
if vargs.v
On 11/27/22 16:40, Skip Montanaro wrote:
I have a script to which I'd like to add a --version flag. It should print
the version number then exit, much in the same way --help prints the help
text then exits. I haven't been able to figure that out. I always get a
complaint about th
> class VersionAction(argparse.Action):
> def __call__(self, parser, namespace, values, option_string):
> print(VERSION)
> exit()
...
> parser.add_argument("-v", "--version", nargs=0, action=VersionAction)
Thanks. An action class didn
I wondered whether subparsers might work, but they don't quite fit here.
This seems to fit the bill fairly well, though I agree it would be
nice if there were a neater option:
import argparse
import sys
VERSION = 0.1
def main(args):
parser.parse_args(args)
class VersionA
I have a script to which I'd like to add a --version flag. It should print
the version number then exit, much in the same way --help prints the help
text then exits. I haven't been able to figure that out. I always get a
complaint about the required positional argument.
I think I
1 - 100 of 1779 matches
Mail list logo