Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

<sangr> home is where the highest bandwidth is


devel / comp.lang.python / Re: Portable executable on OSX

SubjectAuthor
* Portable executable on OSXwdamn
+- Re: Portable executable on OSXCameron Simpson
+- Re: Portable executable on OSXThomas Passin
`- Re: Portable executable on OSXChris Angelico

1
Portable executable on OSX

<b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:620a:2905:b0:6ee:e598:a973 with SMTP id m5-20020a05620a290500b006eee598a973mr8778863qkp.338.1666260119595;
Thu, 20 Oct 2022 03:01:59 -0700 (PDT)
X-Received: by 2002:a05:6870:d584:b0:137:2c18:6864 with SMTP id
u4-20020a056870d58400b001372c186864mr7504699oao.245.1666260119312; Thu, 20
Oct 2022 03:01:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Thu, 20 Oct 2022 03:01:59 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=85.212.161.103; posting-account=sWeJIQoAAAAQNUK-eB--RsWylXiC7r-u
NNTP-Posting-Host: 85.212.161.103
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
Subject: Portable executable on OSX
From: wallacec...@gmail.com (wdamn)
Injection-Date: Thu, 20 Oct 2022 10:01:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1182
 by: wdamn - Thu, 20 Oct 2022 10:01 UTC

hi all,

I would like to have a portable executable of python3 on OSX.

I google a lot about it, but I could not find any solution.
Am I missing something or is it simply not possible?

thanks

Re: Portable executable on OSX

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: cs...@cskk.id.au (Cameron Simpson)
Newsgroups: comp.lang.python
Subject: Re: Portable executable on OSX
Date: Fri, 21 Oct 2022 07:53:45 +1100
Lines: 21
Message-ID: <mailman.756.1666299718.20444.python-list@python.org>
References: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
<Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Trace: news.uni-berlin.de c9/e33cXWrtHFIt77HdUfw1A3YRP8360aRf8bZoWOcqw==
Return-Path: <cameron@cskk.id.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.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'this:': 0.03; 'derived':
0.09; 'cheers,': 0.11; 'cameron': 0.16; 'command.': 0.16;
'executable': 0.16; 'from:addr:cs': 0.16; 'from:addr:cskk.id.au':
0.16; 'from:name:cameron simpson': 0.16; 'invoke': 0.16; 'mean.':
0.16; 'mean:': 0.16; 'message-id:@cskk.homeip.net': 0.16;
'possible?': 0.16; 'python3': 0.16; 'received:13.237': 0.16;
'received:13.237.201': 0.16; 'received:13.237.201.189': 0.16;
'received:cskk.id.au': 0.16; 'received:id.au': 0.16;
'received:mail.cskk.id.au': 0.16; 'simpson': 0.16; 'subject:OSX':
0.16; 'wrote:': 0.16; 'python': 0.16; 'to:addr:python-list': 0.20;
'mac': 0.22; 'command': 0.23; 'run': 0.23; "i'd": 0.24;
'solution.': 0.26; 'expect': 0.28; 'it,': 0.29; 'header:User-
Agent:1': 0.30; 'approach': 0.31; 'but': 0.32; "i'm": 0.33;
'script': 0.33; 'header:In-Reply-To:1': 0.34; 'programme': 0.35;
'received:au': 0.35; 'usual': 0.35; 'missing': 0.37; 'could':
0.38; 'use': 0.39; 'something': 0.40; 'should': 0.40; 'simply':
0.63; 'received:13': 0.64; 'your': 0.64; 'received:userid': 0.66;
'skip:# 10': 0.68; 'subject:Portable': 0.84; '"how': 0.91
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
User-Agent: Mutt/2.2.7 (2022-08-07)
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: <Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
X-Mailman-Original-References: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
 by: Cameron Simpson - Thu, 20 Oct 2022 20:53 UTC

On 20Oct2022 03:01, wdamn <wallacechemical@gmail.com> wrote:
>I would like to have a portable executable of python3 on OSX.
>
>I google a lot about it, but I could not find any solution.
>Am I missing something or is it simply not possible?

I'm not sure what you mean. My Mac comes presupplied with Python 3, and
I'd expect any modern Mac to be the same. So a python 3 programme should
work on any Mac.

If you mean: "how do I write a Python script to use python 3?" the usual
approach is to start the script with a shebang line like this:

#!/usr/bin/env python3

On _any_ UNIX or UNIXlike system (OSX/MacOS is a BSD derived UNIX) this
will run the script with your usual "python3" command if you invoke the
script as a command.

Cheers,
Cameron Simpson <cs@cskk.id.au>

Re: Portable executable on OSX

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: lis...@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: Portable executable on OSX
Date: Thu, 20 Oct 2022 17:48:34 -0400
Lines: 47
Message-ID: <mailman.757.1666302530.20444.python-list@python.org>
References: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
<Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
<e6cc10f3-bf40-a2b3-e61b-9b35b62d2983@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de BvgDBjE9pDC1rJlFlsdmYAhHZnWhqA/QmZ5dfOsAFHPw==
Return-Path: <list1@tompassin.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=tompassin.net header.i=@tompassin.net header.b=Lj+Mvlgl;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'this:': 0.03; 'run.':
0.05; 'python.': 0.08; 'derived': 0.09; 'macos,': 0.09;
'typically': 0.09; 'cheers,': 0.11; '@echo': 0.16; 'batch': 0.16;
'cameron': 0.16; 'command.': 0.16; 'directories': 0.16;
'executable': 0.16; 'executed': 0.16; 'idea.': 0.16; 'invoke':
0.16; 'mean.': 0.16; 'mean:': 0.16; 'odd-looking': 0.16; 'paths':
0.16; 'plug': 0.16; 'possible?': 0.16; 'python3': 0.16;
'received:10.0.0': 0.16; 'received:64.90': 0.16;
'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
'resides': 0.16; 'simpson': 0.16; 'stick': 0.16; 'subject:OSX':
0.16; 'wrote:': 0.16; 'python': 0.16; 'pm,': 0.19; 'to:addr
:python-list': 0.20; 'mac': 0.22; 'command': 0.23; 'skip:p 30':
0.23; 'run': 0.23; "i'd": 0.24; 'python,': 0.25; 'solution.':
0.26; 'done': 0.28; 'expect': 0.28; 'it,': 0.29; 'header:User-
Agent:1': 0.30; 'approach': 0.31; 'program': 0.31;
'received:10.0': 0.32; 'received:mailchannels.net': 0.32;
'received:relay.mailchannels.net': 0.32; 'but': 0.32; "i'm": 0.33;
'path': 0.33; 'script': 0.33; 'windows': 0.34; 'header:In-Reply-
To:1': 0.34; 'running': 0.34; 'complex': 0.35; 'programme': 0.35;
'usual': 0.35; 'files': 0.36; 'missing': 0.37; "it's": 0.37;
'file': 0.38; 'way': 0.38; 'could': 0.38; 'means': 0.38;
'setting': 0.39; 'use': 0.39; 'program.': 0.40; 'something': 0.40;
'should': 0.40; 'in,': 0.60; 'gives': 0.62; 'here': 0.62;
'simply': 0.63; 'ago.': 0.64; 'your': 0.64; 'years': 0.65;
'types': 0.67; 'header:Received:6': 0.67; 'received:64': 0.67;
'skip:# 10': 0.68; 'effective': 0.78; '"set': 0.84;
'subject:Portable': 0.84; '"how': 0.91
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1666302515; a=rsa-sha256;
cv=none;
b=gcINt9RFWxXTSBkrC/lLkFH1dFDCKfQ+cJylB9CeDsHfE37G0n0dDLdHdF3S+e5LWlHxew
X33ld/ph0p/4emo1RMsOopphcRy7mQwV/AC+PC2YSke8iQfm7wJa0PmYlGemMnNBCAmh2a
UPwuPCzKFyLArKMbuYrjAP9Yk5HqWXkNCn5CVPlllziczF6CjnONWLxWoW0B6tsacfpI0x
yeHqErmpryn2l0SLme8tasOgNmUQnwwneQ4bacN0iolbkcyNgZGpo5wufOUDKAGeV5gOlK
jbSjX/w3DxyHmyhE1g2gSjNhoQbpEE7a1mS2me2pc4JmLrQ/11ijcamq5TFOEQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1666302515;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=FyqGrjO7uk25fxqYVYT2/ne2FUAoeucBtJnvnJ2P224=;
b=JK/bduUj5xreFh80t5TCIu62005CIqvqA9V6HA4Es6b6YTd4IIb9DfpuamxcYeQQcNaNLj
AhIkg4MaKc+dOVTPD79+Y9r+ZaPDj1tIuqV7MLgedyjcqxKGihuIB+qyiXKIJUApVXvFMf
DspmcVKIutDN8HsKIMJ0ee+sKE5V0OFhmA9WLcOCaja4BeF1b234M1M4HcC2kWGu3eaz/K
AnrgWne+LLaI+goDRZl+tcitUxSjK7fG7UkHBC0ENWvK5k8BI/8ymZxuS6x4Qx9CL28Xiv
kWumGycLvx5D02ivYOtLjU8pRen9PqMe+msthlU/G3G4JzgBxastynbpnN4aig==
ARC-Authentication-Results: i=1; rspamd-6955c7cd5b-rvkv2;
auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Unite-Macabre: 3e89db022d174bbc_1666302519139_721928319
X-MC-Loop-Signature: 1666302519139:3400518719
X-MC-Ingress-Time: 1666302519138
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1666302515;
bh=FyqGrjO7uk25fxqYVYT2/ne2FUAoeucBtJnvnJ2P224=;
h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding;
b=Lj+MvlglLQKuwPy0t30Hz89MGbuAhwIw3xRSWGEJf0WPm6mbZfSW6JtKEgSNIrUdp
/6AEu2Mf8xI5qHMC0akjKwNWjzkTUwMKy2WIOg9Unh//1wJ+22PhJK2T2EM69GuvUE
J0pMLJnAM0UyXiUkTVJ8NC1KBr4rUjXYbdTg7YYRH2k54j9h60vrt3dIitNDhd0ums
OQHjiO/lnsOU5OSx5ZMPj3SXySaBQRAy5lfmiuEVcS+nXyLMRwC2XLjHQpqAjqU86p
tVzisSxgjOguwa5/pflTzeWoIFyLm8wE7uGAytwEoXQAdmoOSnOiUw5S9fEwZo01WK
LTwuSwTlGIrFw==
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.2
Content-Language: en-US
In-Reply-To: <Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
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: <e6cc10f3-bf40-a2b3-e61b-9b35b62d2983@tompassin.net>
X-Mailman-Original-References: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
<Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
 by: Thomas Passin - Thu, 20 Oct 2022 21:48 UTC

"Portable executable" usually means that the program resides on
removable media, like a USB stick. You can go to a computer, plug the
stick in, and run the program. If it's Python, then the installation on
the removable medium needs to set up all the paths and directories
correctly before actually running Python. That would typically be done
with batch files setting paths and environmental variables.

I got this working for Python on Windows some years ago. Here is the
setup batch file I used - it gets executed when the user types "pyth37":

@echo off
setlocal
: Find effective drive for this file.
set ed=%~d0
path %ed%\python37\Scripts;%ed%\python37;%PATH%
set PYTHONUSERBASE=%ed%\user\python
set HOME=%ed%\user\python
call python %*
endlocal

It might need to be be more complex on MacOS, but it gives you the idea.
The odd-looking line "set ed=%~d0" is a Windows-specific way to get
the drive of the command file being run.

On 10/20/2022 4:53 PM, Cameron Simpson wrote:
> On 20Oct2022 03:01, wdamn <wallacechemical@gmail.com> wrote:
>> I would like to have a portable executable of python3 on OSX.
>>
>> I google a lot about it, but I could not find any solution.
>> Am I missing something or is it simply not possible?
>
> I'm not sure what you mean. My Mac comes presupplied with Python 3, and
> I'd expect any modern Mac to be the same. So a python 3 programme should
> work on any Mac.
>
> If you mean: "how do I write a Python script to use python 3?" the usual
> approach is to start the script with a shebang line like this:
>
>     #!/usr/bin/env python3
>
> On _any_ UNIX or UNIXlike system (OSX/MacOS is a BSD derived UNIX) this
> will run the script with your usual "python3" command if you invoke the
> script as a command.
>
> Cheers,
> Cameron Simpson <cs@cskk.id.au>

Re: Portable executable on OSX

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: Portable executable on OSX
Date: Fri, 21 Oct 2022 08:53:51 +1100
Lines: 36
Message-ID: <mailman.758.1666302844.20444.python-list@python.org>
References: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
<Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
<e6cc10f3-bf40-a2b3-e61b-9b35b62d2983@tompassin.net>
<CAPTjJmpOKZ3kouhtH7b-TeoU5QbSy6BhxMdjTy78H_Ae-55D5g@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de UR/AdlriMCxZyzxtw6RODA5FWvEVtuLIbXNcKVOaMxkw==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=IfBXCHJf;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'looks': 0.02; '2022':
0.05; 'run.': 0.05; 'searching': 0.05; 'python.': 0.08; 'depend':
0.09; 'macos,': 0.09; 'typically': 0.09; '@echo': 0.16; 'batch':
0.16; 'chrisa': 0.16; 'directories': 0.16; 'executed': 0.16;
'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16;
'idea.': 0.16; 'odd-looking': 0.16; 'paths': 0.16; 'plug': 0.16;
'resides': 0.16; 'ridiculous': 0.16; 'script,': 0.16; 'stick':
0.16; 'subject:OSX': 0.16; 'wrote:': 0.16; 'python': 0.16;
'to:addr:python-list': 0.20; 'fri,': 0.22; 'command': 0.23;
'skip:p 30': 0.23; 'run': 0.23; 'idea': 0.24; 'python,': 0.25;
"wasn't": 0.26; 'else': 0.27; 'done': 0.28; 'program': 0.31;
'message-id:@mail.gmail.com': 0.32; 'but': 0.32; 'path': 0.33;
'windows': 0.34; 'able': 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'running': 0.34; 'complex': 0.35;
'from:addr:gmail.com': 0.35; 'files': 0.36; "it's": 0.37;
'received:209.85': 0.37; 'file': 0.38; 'way': 0.38; 'means': 0.38;
'received:209': 0.39; 'received:209.85.208': 0.39; 'setting':
0.39; 'program.': 0.40; 'should': 0.40; 'in,': 0.60; 'gives':
0.62; 'here': 0.62; 'everything': 0.63; 'ago.': 0.64; 'years':
0.65; 'types': 0.67; 'effective': 0.78; '"set': 0.84; 'sound.':
0.84; 'subject:Portable': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=X2MycRnUJQRVNMgvYtcWhh+jTgb+ldrPMZKWnegskJ8=;
b=IfBXCHJfDV3AGxszYjsNoKPocWEU5RVqfHd56IdyZpKZg8eAMlKV/y6SulEGfo69IY
6W354ztXceXWMb5O0dwN+W9QRftxEoL0VvV37Jchh4Z5Znc88iGluc+8odtAEkBBKdMR
QD+uPylDiIc2gesz8LMCGLHZRG8u1mc1MyfiZ/TDn6budzFd1IqRtwhYNviKpD0pqoJU
z6H4Pl5ohEgINOLCrnFyYPvJNUbOL6KGvqm9delYTqGisoN9ado+Pxu6YvbW2a0idmvY
8KInjCahXalD2hmeamNZzPYtsN8s7QygsYwdRdx+vigWng9Ityzqdnhz2f+hSmjKPKXJ
M1Bg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=X2MycRnUJQRVNMgvYtcWhh+jTgb+ldrPMZKWnegskJ8=;
b=SfvshuC77kn4hhIs8yC9E/1u6/YsCXItQHCfkE0hZmqPx+liPwOw2OzChjuTz/6OFS
29hV6OJkKGidiS9/f58pjkF3CTTjQCiBCKyIoR7Q2zk1TRy5u2H8X1UZSoHGlBS4R7P/
HkuEs3tQgkoOHoa+VUgAE9Xx2XUl8ZjU1rggWeCJLnEkEV+5l2XhhexiF8u2aGm4CGCg
4+2HQjzwMPPdYEqRA1+r6BZIF5Np7mTe79WcZOLtmpwpZXfxqm1uBUobtfH8wmM0bLSX
ajBYVJQcQ6CcIKJn652fstNN6TvhbyP1vMXw0RTpbkniSaO3HJi77Re4VU87uZ5yHYQP
FrfQ==
X-Gm-Message-State: ACrzQf1TmVREpfiW4uM/xebCfC/gPkEFXcrFiCZHtIVcOmtmrHB3nVEp
Y5pLztM4RLAtDAJ/0C0k1pOpyuuespGU5BiqcgoQJuYu
X-Google-Smtp-Source: AMsMyM44vY8MGOITDBA5ZfsfwsXi7PE+q5+j9UAaNJdrz/qi05YiRRd1u7LdejdXABUDPhrYzyRcxaHQ5diEKK0Thhg=
X-Received: by 2002:a05:6402:26d2:b0:45d:280b:5878 with SMTP id
x18-20020a05640226d200b0045d280b5878mr14359314edd.385.1666302842505; Thu, 20
Oct 2022 14:54:02 -0700 (PDT)
In-Reply-To: <e6cc10f3-bf40-a2b3-e61b-9b35b62d2983@tompassin.net>
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: <CAPTjJmpOKZ3kouhtH7b-TeoU5QbSy6BhxMdjTy78H_Ae-55D5g@mail.gmail.com>
X-Mailman-Original-References: <b54d3909-777b-4ac0-ab55-40b43feb20aan@googlegroups.com>
<Y1G1WeS7ZmgCpEcn@cskk.homeip.net>
<e6cc10f3-bf40-a2b3-e61b-9b35b62d2983@tompassin.net>
 by: Chris Angelico - Thu, 20 Oct 2022 21:53 UTC

On Fri, 21 Oct 2022 at 08:50, Thomas Passin <list1@tompassin.net> wrote:
>
> "Portable executable" usually means that the program resides on
> removable media, like a USB stick. You can go to a computer, plug the
> stick in, and run the program. If it's Python, then the installation on
> the removable medium needs to set up all the paths and directories
> correctly before actually running Python. That would typically be done
> with batch files setting paths and environmental variables.
>
> I got this working for Python on Windows some years ago. Here is the
> setup batch file I used - it gets executed when the user types "pyth37":
>
> @echo off
> setlocal
> : Find effective drive for this file.
> set ed=%~d0
> path %ed%\python37\Scripts;%ed%\python37;%PATH%
> set PYTHONUSERBASE=%ed%\user\python
> set HOME=%ed%\user\python
> call python %*
> endlocal
>
> It might need to be be more complex on MacOS, but it gives you the idea.
> The odd-looking line "set ed=%~d0" is a Windows-specific way to get
> the drive of the command file being run.
>

Basic idea looks sound. Might actually be _easier_ on OSX, since it's
Unix-like and you should be able to depend on /bin/bash. The notation
`dirname $0` should give you the path to the current script, from
which everything else can be calculated.

(Caveat: Never actually done this on a Mac, and only did cursory web
searching to check that it wasn't a ridiculous idea.)

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor