Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.python / Re: PythonPath / sys.path

SubjectAuthor
o PythonPath / sys.pathThomas Passin

1
Re: PythonPath / sys.path

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

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=23231&group=comp.lang.python#23231

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: list1@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: PythonPath / sys.path
Date: Sun, 14 May 2023 19:04:08 -0400
Lines: 47
Message-ID: <mailman.67.1684106456.13552.python-list@python.org>
References: <645F69AC.14631.33F7F4@RealGrizzlyAdams.vivaldi.net>
<12B1206B-7773-4870-B3CC-93126AEEFC70@barrys-emacs.org>
<eb14b158-830c-8aa1-7e07-7a823483ba25@wichmann.us>
<64612FE4.15459.124FD5F@RealGrizzlyAdams.vivaldi.net>
<61608167-dd66-485c-33ee-f2c4292354bf@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 35XgtksXuBJltnkmSq1xgw9oliVd0eQ49EjqAT1AidgQ==
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=gRlCuvRi;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pip': 0.04; 'variable':
0.05; 'windows,': 0.05; 'world"': 0.05; '"hello': 0.07; '2023':
0.07; 'python.': 0.08; 'idle': 0.09; 'later,': 0.09; 'linux':
0.09; 'moved': 0.09; 'newbie': 0.09; 'terminal': 0.09;
'tutorial,': 0.09; 'ubuntu': 0.09; 'import': 0.15; 'supported':
0.15; '[snip]': 0.16; 'batch': 0.16; 'box.': 0.16; 'c++,': 0.16;
'directory,': 0.16; 'easiest': 0.16; 'gui,': 0.16; 'hassle,':
0.16; 'launching': 0.16; 'mats': 0.16; 'part)': 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;
'received:dreamhost.com': 0.16; 'reference,': 0.16; 'sony': 0.16;
'wichmann': 0.16; 'wrote:': 0.16; 'python': 0.16; 'hardware':
0.19; 'pm,': 0.19; 'to:addr:python-list': 0.20; 'first,': 0.22;
'version': 0.23; 'install': 0.23; 'installed': 0.23; 'run': 0.23;
'questions,': 0.26; 'seems': 0.26; 'tried': 0.26; 'old': 0.27;
'done': 0.28; 'environment': 0.29; 'header:User-Agent:1': 0.30;
'seem': 0.31; 'putting': 0.31; 'saved': 0.31; 'python-list': 0.32;
'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; 'same': 0.34; 'header:In-Reply-To:1': 0.34;
'running': 0.34; 'trying': 0.35; 'runs': 0.35; 'files': 0.36;
'using': 0.37; "it's": 0.37; 'directory': 0.37; 'hard': 0.37;
'file': 0.38; 'way': 0.38; 'thanks': 0.38; 'two': 0.39; 'added':
0.39; 'least': 0.39; 'setting': 0.39; 'use': 0.39; 'still': 0.40;
'program.': 0.40; 'try': 0.40; 'should': 0.40; 'come': 0.62;
'once': 0.63; 'hear': 0.64; 're:': 0.64; 'thus': 0.64; 'your':
0.64; 'plan': 0.64; 'box': 0.65; 'daily': 0.65; 'look': 0.65;
'years': 0.65; 'worked': 0.67; 'header:Received:6': 0.67; 'time,':
0.67; 'received:64': 0.67; 'obvious': 0.69; 'working,': 0.69;
'took': 0.69; 'future': 0.72; 'little': 0.73; 'treat': 0.76;
'decent': 0.84; 'good,': 0.84; 'talked': 0.84; 'adams': 0.91
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1684105449; a=rsa-sha256;
cv=none;
b=pnfT7VgNfxahTjwTkQu4mdB/nGPzIo5QQcLW+n4RnYwv0QW0KR+LW0JGfIYC7Z05Xc7wkG
UGiRoIe3B0Ik1WKWsjoQoFSYMoqqrHQn8XMqZiCszym3lFIo7u8yV+2bLeyUNBK1pUQCeu
9NPvOLzZz/sR5o0H3Ooh4hNHZsWzv1RUV7rYfuxaNEK/PHqi1v11CKwJX9+eCdx0HuShOd
JgPdPFNl10aSDYx/blAaB19dvLAaEVqJuXacXoOeSqhJoYqbM5CAR5Mbx3AoCTpr9HWdzu
J+5P/Ou2FDQGxmjD224/EE8oVw4FJmeM2fYNPC/zJAADP5bBIrBkcrY599Vppg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1684105449;
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=+OZ+K4N2Vqs7XggLhRkgdAFPSPs83E+QmpbBB1BGtkA=;
b=Ub4IIkiSrFr7ifJ071skxXOTqzAv+fAMqwRbjpIdSsxcLFThroD1gz219vmomTvCCjzFd3
XrZxzdx3VeP0eTphTXIl8VsaB/Wi5sLLI5kf0KzclFMB12EwxjwhMX9ePC5UxeKYpe7ACk
eT2q+iaMF8TtGMXrj7IDN376GJL3QogHfzC6XL6YK/xB5uyJDLqtdJIk5YRVtBbb8QpJDL
rlJv3naqXskQqRTz7Uxhmscrr/UWuSoKMAMvVfqayefz8cbbVaIrOEKN5wriJWdHqDOiFi
6GWPVulwDJuMYzkzdiUZkNzYF9unGjQbisjrYVioA1tPNk3qY71jXr5FrR7Y2A==
ARC-Authentication-Results: i=1; rspamd-5cdf8fd7d9-5k67r;
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-Society-Trail: 1ec960422044ecf7_1684105450116_3902507296
X-MC-Loop-Signature: 1684105450116:2747448314
X-MC-Ingress-Time: 1684105450115
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1684105449;
bh=+OZ+K4N2Vqs7XggLhRkgdAFPSPs83E+QmpbBB1BGtkA=;
h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding;
b=gRlCuvRifkzikFSoBy2zwIQX4HdftuVos19m8p0FFE8IEVnAhwOTMIvZkHq7BTpVA
pSb5p3lTfO9oQ8N66gpHs+1uY7iyy4sqoJt+YHbF8eVNkggmduHJjKYn2mxFA4O/9q
B/hEV1hHa+T7WybZ7Fx2O8AZJra5HPBPr4PLNbXokrvYgROsmwFL7GcA11SLNSH8vY
0NxpiTP0xfC23wHGhywgbEPJSai4qytPoY0m8n06KVvpRPCL1hpCV+xk2V44nmiuJq
tWUML1QNe+AoWdBaJ3vsIOxxK6Z8dq0aser8mRCSfP2wG2lXmqKs7A5wY2j2x0djcV
BE5dZDTshEv1Q==
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Content-Language: en-US
In-Reply-To: <64612FE4.15459.124FD5F@RealGrizzlyAdams.vivaldi.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: <61608167-dd66-485c-33ee-f2c4292354bf@tompassin.net>
X-Mailman-Original-References: <645F69AC.14631.33F7F4@RealGrizzlyAdams.vivaldi.net>
<12B1206B-7773-4870-B3CC-93126AEEFC70@barrys-emacs.org>
<eb14b158-830c-8aa1-7e07-7a823483ba25@wichmann.us>
<64612FE4.15459.124FD5F@RealGrizzlyAdams.vivaldi.net>
 by: Thomas Passin - Sun, 14 May 2023 23:04 UTC

On 5/14/2023 3:00 PM, Grizzy Adams via Python-list wrote:
> Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote:
> Re: PythonPath / sys.path (at least in part)
[snip]
> I have since moved up (a little) so only ~4 years old, I then updated pip from
> 9.x to 19.1
>
> reason its an old version is it's an old PC (XpPro), if I start to get passable
>
> at this I will try it on my Ubuntu box which is running 22.04 (latest LTS) and
> 23.04, (23.10 daily builds soon) I took a look and it seems I "may" have to
> play a little to get IDLE on (if it's not in the normal repo's)
>
> I seem to have managed to sort "PythonPath / sys.path" the environment variable
>
> is working, so I can now import my_work without any other hassle, which is
> good, now I find that some of the files which worked a treat from GUI, Editor
> (F5) or terminal but don't do the same once saved and imported later, I'm sure
> it's me, I have come from VB/VBA, Delphi and a (very) little C++, and am still
> working through the python tutorial, trying not to skip ahead (ok I did skip
> "Hello World" :->) so I may end up asking some (senior moment) newbie
> questions, I will try hard to work it out myself first
>
> Thanks to all who got me thus far

Good to hear you can run your program. For future reference, when you
talked about setting PYTHONPATH, it would have been helpful to know just
what you did when you tried to set it.

If you plan to use this directory location much of the time, two good
ways to do so are 1) putting that path in a .pth file in the
site-packages directory, or 2) launching Python using a batch file that
sets PYTHONPATH first, then runs Python. On Windows, in a batch file
you should use SETLOCAL before setting PYTHONPATH and ENDLOCAL at the
end of the batch file. That's the easiest way to remove the PYTHONPATH
variable after you are done with it.

You made a little slam against Windows, but you will find it harder to
get things working on Linux. Ubuntu, like many other Linux distros,
does not come with pip and Tk (needed for Idle) installed, and it's not
so obvious how to install them.

For your old computer, I added an external 1TB solid state drive (Note:
not a usb stick) to a decade-old Sony VAIO and installed Linux Mint to
the SSD. It's got pretty decent responsiveness and all the old hardware
is supported out of the box.


devel / comp.lang.python / Re: PythonPath / sys.path

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor