Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Less is more or less more -- Y_Plentyn on #LinuxGER


devel / comp.lang.python / Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

SubjectAuthor
o Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't worMike Dewhirst

1
Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

<mailman.50.1705276301.15798.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24852&group=comp.lang.python#24852

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: mik...@dewhirst.com.au (Mike Dewhirst)
Newsgroups: comp.lang.python
Subject: Re:_Python_3.12.1,_Windows_11:_shebang_line_
#!/usr/bin/env_python3 __doesn't_work_any_more
Date: Mon, 15 Jan 2024 10:46:06 +1100
Lines: 46
Message-ID: <mailman.50.1705276301.15798.python-list@python.org>
References: <8dcf3464-e32f-457b-8938-0ff013ed4262@web.de>
<4TCsVz4CzPznVGL@mail.python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
X-Trace: news.uni-berlin.de eMmcLs3DzpjP+NzeMjuWbAioJxVy+tUZC3INUu9Gl5Og==
Cancel-Lock: sha1:Fu8CnvQFogZxQU7+yt+xOzN7A04= sha256:kQonHp89IOAfLTka4/nfRo4EyQwnWCZQLT5GXEam1h4=
Return-Path: <miked@dewhirst.com.au>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'thread': 0.05; 'demands':
0.07; 'pep': 0.07; 'subject:Windows': 0.07; '"python"': 0.09;
'11.': 0.09; 'linux': 0.09; 'originally': 0.09; 'schrieb': 0.09;
'subject:Python': 0.12; '&gt;': 0.14; 'url:mailman': 0.15;
'--------': 0.16; 'barry': 0.16; 'batch': 0.16; 'both.': 0.16;
'computers.': 0.16; 'from:addr:dewhirst.com.au': 0.16;
'from:addr:miked': 0.16; 'from:name:mike dewhirst': 0.16;
'happening.': 0.16; 'ignored': 0.16; 'introduces': 0.16;
'mandates': 0.16; 'oh,': 0.16; 'python3': 0.16;
'received:webmastery.com.au': 0.16; 'subject:usr': 0.16;
'windows.': 0.16; 'wrote:': 0.16; 'problem': 0.16; 'python': 0.16;
'to:addr:python-list': 0.20; 'written': 0.22; "i've": 0.22;
'creates': 0.22; "what's": 0.22; 'command': 0.23; 'lines': 0.23;
'skip:- 10': 0.25; 'url-ip:188.166.95.178/32': 0.25; 'url-
ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'cannot': 0.25;
'url-ip:188.166/16': 0.25; 'seems': 0.26; 'tried': 0.26;
'configure': 0.26; "isn't": 0.27; 'email addr:python.org&gt;':
0.28; 'wrong': 0.28; 'url-ip:188/8': 0.31; 'think': 0.32;
"doesn't": 0.32; 'execution': 0.32; 'python-list': 0.32; 'unless':
0.32; 'but': 0.32; 'there': 0.33; 'particular': 0.33; 'path':
0.33; 'received:192.168.0': 0.33; 'windows': 0.34; 'someone':
0.34; "didn't": 0.34; 'mean': 0.34; 'header:In-Reply-To:1': 0.34;
'running': 0.34; 'complex': 0.35; 'handling': 0.35; 'received:au':
0.35; 'really': 0.37; 'received:192.168': 0.37; 'file': 0.38;
'read': 0.38; 'thanks': 0.38; 'two': 0.39; 'date:': 0.39; 'use':
0.39; 'methods': 0.39; 'still': 0.40; 'situation': 0.40; 'both':
0.40; 'skip:h 10': 0.61; 'to:': 0.62; 're:': 0.64; 'your': 0.64;
'message-id:invalid': 0.68; 'skip:# 10': 0.68; 'skip:w 20': 0.69;
'trust': 0.71; 'details.': 0.76; 'kindly': 0.80; 'dead': 0.81;
'11:': 0.84; 'believing': 0.84; 'chooses': 0.84; 'email name:&lt
;python-list': 0.84; 'lines,': 0.84; 'reflection': 0.84; 'scott':
0.84; 'subject:bin': 0.84; 'subject: ': 0.91; 'received:103':
0.91; 'duplicate': 0.93; 'mixed': 0.93; 'subject:more': 0.95
SavedFromEmail: miked@dewhirst.com.au
In-Reply-To: <8dcf3464-e32f-457b-8938-0ff013ed4262@web.de>
Importance: normal
X-PPP-Message-ID: <20240114234613.725906.46084@plesk01.e1.webmastery.com.au>
X-PPP-Vhost: dewhirst.com.au
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <4TCsVz4CzPznVGL@mail.python.org>
 by: Mike Dewhirst - Sun, 14 Jan 2024 23:46 UTC

In Windows the provided methods for running complex command lines are either a batch file or a shortcut.Someone very kindly pointed out to me in this thread that there is a PEP for py.exe. I don't use py.exe originally because I didn't trust it believing it was a new-fangled Microsoft trick. I did read that PEP but it has no relevance for my mixed Windows/Linux environments. On reflection I now believe I won't use py.exe because it introduces an unnecessary layer of indirection.The  bottom line is that you still need to know which Python a particular set of circumstances demands and if you use py.exe you then need to also understand how it chooses and how it interprets shebang lines written for your Linux environment. And if that isn't your situation I have jumped to the wrong conclusion.I have found no problem in Windows when I use shebang lines in scripts intended for execution in both Linux and Windows. They are ignored unless you use py.exe.My advice is to give up py.exe unless your use case mandates shebang lines in Windows.M--(Unsigned mail from my phone)
-------- Original message --------From: Sibylle Koczian via Python-list <python-list@python.org> Date: 14/1/24 23:59 (GMT+10:00) To: python-list@python.org Subject: Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3
doesn't work any more Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list:> > >> On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list <python-list@python.org> wrote:>>>> Oh, and the two Windows and Python versions are on two different computers.>>>> Will remove the "/env" from my shebang lines, even if I don't understand what's happening.> > Thanks for the details.> > Only thing I can think of is that "python" may be defaulting to mean python 2.> If you use "#!/usr/bin/env python3" it may work on both.No, it doesn't. That's the form I started with. When it didn't work I thought "python3" might be too old, because Python 2 is dead for so long.> > Did you creates a py.ini file to configure py.exe?> > See if you have %userappdata%\py.ini on either windows 10 or windows 11.> If so what is its contents?No to both.> > I've tried with and without a py.ini and cannot duplicate what you see.> It really seems strange. Only thing I can think of - and I don't really believe in that idea: as far as I know in Windows 11 the handling of PATH has changed. My Python isn't on the path, perhaps that is it. A shebang line without "/env" doesn't check the path, right?Thank you for helping,Sibylle-- https://mail.python.org/mailman/listinfo/python-list

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor