On Tue, 8 Nov 2022 at 15:12, DFS wrote:
>
> 3.9.13
>
My guess? Because you can "import tkinter" in Py3 but "import Tkinter" in Py2.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
3.9.13
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 8 Nov 2022 at 03:08, ICT Ezy wrote:
> Please explain how to generate different output in following logical
> operations
> >>> 0 and True
> 0
> >>> 0 or True
> True
> >>> 1 and True
> True
> >>> 1 or True
> 1
Hi,
The exact explanation of how 'and' and 'or' behave can be read here:
ht
More discussion:
https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my
On 11/7/2022 5:35 PM, Cameron Simpson wrote:
On 07Nov2022 09:28, Chris Green wrote:
Chris Green wrote:
> 3: with your pseudo "python3" script in place, make
On 07Nov2022 09:28, Chris Green wrote:
Chris Green wrote:
> 3: with your pseudo "python3" script in place, make all the scripts use
> the "#!/usr/bin/env python3" shebang suggested above.
>
Yes, that sounds a good plan to me, thanks Cameron.
Doesn't '#!/usr/bin/env python3' suffer from the s
On Tue, 8 Nov 2022 at 08:44, Chris Green wrote:
>
> Barry Scott wrote:
> >
> >
> > > On 7 Nov 2022, at 09:28, Chris Green wrote:
> > >
> > > Chris Green wrote:
> > >>> 3: with your pseudo "python3" script in place, make all the scripts use
> > >>> the "#!/usr/bin/env python3" shebang suggested
Barry Scott wrote:
>
>
> > On 7 Nov 2022, at 09:28, Chris Green wrote:
> >
> > Chris Green wrote:
> >>> 3: with your pseudo "python3" script in place, make all the scripts use
> >>> the "#!/usr/bin/env python3" shebang suggested above.
> >>>
> >> Yes, that sounds a good plan to me, thanks C
Am 07.11.22 um 18:12 schrieb Dioumacor FAYE:
hi everyone
I wanted to transform this matlab code into python. If anyone can help me
please let me know.
load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat
prcp = reshape(precip,[140*100,13879]);
dates = datenum(1981,1,1):datenum(20
Am 07.11.22 um 10:28 schrieb Chris Green:
Chris Green wrote:
3: with your pseudo "python3" script in place, make all the scripts use
the "#!/usr/bin/env python3" shebang suggested above.
Yes, that sounds a good plan to me, thanks Cameron.
Doesn't '#!/usr/bin/env python3' suffer from the sam
> On 7 Nov 2022, at 09:28, Chris Green wrote:
>
> Chris Green wrote:
>>> 3: with your pseudo "python3" script in place, make all the scripts use
>>> the "#!/usr/bin/env python3" shebang suggested above.
>>>
>> Yes, that sounds a good plan to me, thanks Cameron.
>>
> Doesn't '#!/usr/bin/env
Schachner, Joseph (US) wrote:
> Maybe you can't do this, but I would suggest only running on the Python
> 3 systems. Refuse to jump through hoops for the Python 2 system. It is
> years out of date.
Exactly! That's why I (OP) have only one system where this is a
problem. The system is my hostin
On Tue, 8 Nov 2022 at 06:12, Thomas Passin wrote:
>
> The problem is that some Linux systems - I think - still use Python2 to
> perform various system-related tasks. When they call "python", they
> need it to be Python2. If someone has a system like that, they can't
> have the "python" command r
The problem is that some Linux systems - I think - still use Python2 to
perform various system-related tasks. When they call "python", they
need it to be Python2. If someone has a system like that, they can't
have the "python" command run Python3.
On 11/7/2022 1:07 PM, Schachner, Joseph (US)
Maybe you can't do this, but I would suggest only running on the Python 3
systems. Refuse to jump through hoops for the Python 2 system. It is years
out of date.
It is not hard to upgrade from Python 2 to Python 3. There is a 2to3 utility,
and after that there should be very few things you wa
hi everyone
I wanted to transform this matlab code into python. If anyone can help me
please let me know.
load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat
prcp = reshape(precip,[140*100,13879]);
dates = datenum(1981,1,1):datenum(2018,12,31);
date = datevec(dates);
ind_mjja=find
Please explain how to generate different output in following logical operations
>>> 0 and True
0
>>> 0 or True
True
>>> 1 and True
True
>>> 1 or True
1
--
https://mail.python.org/mailman/listinfo/python-list
Chris Green wrote:
> > 3: with your pseudo "python3" script in place, make all the scripts use
> > the "#!/usr/bin/env python3" shebang suggested above.
> >
> Yes, that sounds a good plan to me, thanks Cameron.
>
Doesn't '#!/usr/bin/env python3' suffer from the same problem as
'#!/usr/bin/pytho
Cameron Simpson wrote:
> On 06Nov2022 20:51, jak wrote:
> >Il 06/11/2022 11:03, Chris Green ha scritto:
> >>I have a number of python scripts that I run on a mix of systems. I
> >>have updated them all to run on python 3 but many will also run quite
> >>happily with python 2. They all have a #!
On 2022-11-07 at 11:56:19 +,
"Weatherby,Gerard" wrote:
> Write the wrapper script.
>
> #!/bin/bash
> if [ $(hostname) == "oldystem" ]; then
> exec /usr/bin/python $*
> else
> exec /usr/bin/python2 $*
> fi
Use "$@" (with the quotes) instead of a bare $*. The former preserves
quoted
Write the wrapper script.
#!/bin/bash
if [ $(hostname) == "oldystem" ]; then
exec /usr/bin/python $*
else
exec /usr/bin/python2 $*
fi
From: Python-list on
behalf of Chris Green
Date: Sunday, November 6, 2022 at 3:22 PM
To: python-list@python.org
Subject: Re: How to manage python sheba
> On 7 Nov 2022, at 03:15, Mike Dewhirst wrote:
>
> On 7/11/2022 6:51 am, jak wrote:
>> Il 06/11/2022 11:03, Chris Green ha scritto:
>>> I have a number of python scripts that I run on a mix of systems. I
>>> have updated them all to run on python 3 but many will also run quite
>>> happily w
21 matches
Mail list logo