Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #37: heavy gravity fluctuation, move computer to floor rapidly


comp / comp.lang.python / Re: Correct module for site customization of path

SubjectAuthor
o Re: Correct module for site customization of pathTim Johnson

1
Subject: Re: Correct module for site customization of path
From: Tim Johnson
Newsgroups: comp.lang.python
Date: Sat, 2 Nov 2024 00:50 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: thjmmj15@gmail.com (Tim Johnson)
Newsgroups: comp.lang.python
Subject: Re: Correct module for site customization of path
Date: Fri, 1 Nov 2024 16:50:12 -0800
Lines: 32
Message-ID: <mailman.73.1730508617.4695.python-list@python.org>
References: <adfac553-cac7-4441-b70a-9197723279d8@gmail.com>
<26405.644.968594.532579@ixdm.fritz.box>
<5e2ee6d2-ee0d-4dbe-b6ab-ad640bce4a17@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de ytB7I5mQHCmd9JLSGLW6DQ3SQ6Zz3i4YonVUt+o1dByg==
Cancel-Lock: sha1:DHCAj/uoS3JBpNxzWXCesUk0lyU= sha256:0kp3J3jE8P4t1kK6XIYLXW+K4DV8ML4iI7XEpKvZCYo=
Return-Path: <thjmmj15@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=e9s8DJtb;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.030
X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'looks': 0.02; 'modules':
0.07; 'subject:module': 0.07; 'modules.': 0.09; 'skip:` 10': 0.09;
'import': 0.15; 'wrote:': 0.16; 'python': 0.16; 'message-
id:@gmail.com': 0.18; 'to:addr:python-list': 0.20; 'ran': 0.22;
'install': 0.23; 'seems': 0.26; 'normally': 0.26; 'tim': 0.26;
'version.': 0.28; 'error': 0.29; 'header:User-Agent:1': 0.30;
'module': 0.31; 'received:192.168.1': 0.32; 'subject:for': 0.32;
'path': 0.33; 'script': 0.33; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'from:addr:gmail.com': 0.34; 'files':
0.36; '...': 0.37; 'received:192.168': 0.37; 'put': 0.38;
'thanks': 0.39; 'use': 0.39; 'appears': 0.40; 'tell': 0.60; 'email
addr:gmail.com': 0.63; 'look': 0.65; 'following:': 0.69; 'skip:/
30': 0.69; 'subject:site': 0.70; '(you': 0.76; 'cheers': 0.76;
'upgrades': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1730508614; x=1731113414; darn=python.org;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:to:subject:user-agent:mime-version:date:message-id:from
:to:cc:subject:date:message-id:reply-to;
bh=Q3HNjau69nJafkBmKaMNr6J8pkXjHLTUpqQcm4Hpki4=;
b=e9s8DJtbVl55kMdp7IJfgygTHrIseIQUCZWdTphfgCO383luqZ24yrSfU7eD7y9N6w
HfgtBpgSfn8e6F385SWwhOLqT0kCzhSDwfO5QR2uSPBwV6ksOPyUNvz1cHPV8x88qKuB
gKVd8FH0gEjjHw41eo/HigmYqPtT+ZQKZYqXendafadS8NWPvQrjAYGt3nTnhRE9gM7I
jv1UcF87DNq4GFroCF5iD3vLu3HhfZXj8mwgIxyKBOPVHQb0BEMPYg22q7iG+mSkyF71
+LGHZf37yUYpPj1JUYR5D07yCQ7l8P2xATpyDVTYWT8rqXmwqRXbBI4SJgCGw64AOF+Y
RaeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1730508614; x=1731113414;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=Q3HNjau69nJafkBmKaMNr6J8pkXjHLTUpqQcm4Hpki4=;
b=RcKd298W6UxIwuqS6AnMoYkDXDjR35d8I9jQpJaIpc1gytwzupnM1hXiVHdSGmJ+0S
ZjqTNzD/6NUO3395WrYlwrMZqY9U/QBTpqX4DST5IDrJ+bB6N6epd77/CaPrJcMkpVbJ
/EomTlvVp5l+dl4E7RLDpcSO+sZKxlHoT3qG7xulSM0ZkMaXAz3KVEJa/fm5FNCKp2AO
fZ0Mni4qoXtOANQl1mPQn9gEw5dxqRO9CoMQv/4LxJDlneUhGoRqRWOrxs5gZJD82QHC
89/X9BFu4pS1uKzXMTbCeOw3kzDiQF3suxCmDjQcES/sf/hK2Fx0dZ6hko4aR3OD1UQk
YYUw==
X-Gm-Message-State: AOJu0Yy3Enl8Ky5yDRrY24IxRwK0+Styhrjj3qgjPyCg05FRgO7zDMcx
/lkGpvl/cxEupWMRVhhLibue0mRwOaEOv8QKcOTzPD3yZyHorUa4gdZL/Q==
X-Google-Smtp-Source: AGHT+IEhX+iERZ3I0X57rKIRMRelr3almsN2clXN4VIKNeusBiu1NS9yFct3FG9sEE8amhGIAODHdA==
X-Received: by 2002:a17:902:e5c9:b0:20c:7485:892c with SMTP id
d9443c01a7336-210c6c344c4mr388665005ad.45.1730508614316;
Fri, 01 Nov 2024 17:50:14 -0700 (PDT)
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <26405.644.968594.532579@ixdm.fritz.box>
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: <5e2ee6d2-ee0d-4dbe-b6ab-ad640bce4a17@gmail.com>
X-Mailman-Original-References: <adfac553-cac7-4441-b70a-9197723279d8@gmail.com>
<26405.644.968594.532579@ixdm.fritz.box>
View all headers

On 11/1/24 08:32, dieter.maurer@online.de wrote:
>> ...
>> After the recent upgrades I had to install youtube_dl with pipx for the
>> new python version.
>> When I ran the script which imported youtube_dl, I got an import error
>> as it appears the path to the module
>> was not in sys.path....
> I see at several options:
>
> * install `youtoube_dl` where Python looks for it
> (you can print `sys.path` to find out all the places
> normally checked for importable modules)
>
> * put a (symbolic) link to `youtoube_dl` at a place
> where Python looks for modules
>
> * use Pythons' `.pth' feature to tell Python additional
> places where to look for modules.
> You can place `.pth` files where Python looks for modules
> to be imported
InĀ  /usr/lib/python3.12/sitecustomize.py I put the following:
import sys
sys.path.append("path to youtube_dl")
# In /usr/lib/python3.12/sitecustomize.py
# Thanks seems to work for me
cheers

--
Tim
thjmmj15@gmail.com

1

rocksolid light 0.9.8
clearnet tor