Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Gravity brings me down.


devel / comp.lang.python / Re: Importlib behaves differently when importing pyd file

SubjectAuthor
* Importlib behaves differently when importing pyd fileJach Feng
`* Re: Importlib behaves differently when importing pyd fileDieter Maurer
 `- Re: Importlib behaves differently when importing pyd fileJach Feng

1
Importlib behaves differently when importing pyd file

<6d86c0bd-0832-4279-bad8-f049951454b9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:622a:480b:b0:3a5:6aa1:7cd6 with SMTP id fb11-20020a05622a480b00b003a56aa17cd6mr20052923qtb.146.1668581528156;
Tue, 15 Nov 2022 22:52:08 -0800 (PST)
X-Received: by 2002:a05:6870:4d1c:b0:13b:c263:c8e9 with SMTP id
pn28-20020a0568704d1c00b0013bc263c8e9mr1000149oab.142.1668581527948; Tue, 15
Nov 2022 22:52:07 -0800 (PST)
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: Tue, 15 Nov 2022 22:52:07 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=218.166.9.14; posting-account=G2sM6AoAAADOlDdo9rWD6sFkj3T5ULsz
NNTP-Posting-Host: 218.166.9.14
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d86c0bd-0832-4279-bad8-f049951454b9n@googlegroups.com>
Subject: Importlib behaves differently when importing pyd file
From: jfo...@ms4.hinet.net (Jach Feng)
Injection-Date: Wed, 16 Nov 2022 06:52:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1557
 by: Jach Feng - Wed, 16 Nov 2022 06:52 UTC

My working directory d:\Works\Python\ has a package 'fitz' looks like this:

.....fitz\
.........__init__.py
.........fitz.py
.........utils.py
........._fitz.pyd

There is a statement in fitz.py:
.....return importlib.import_module('fitz._fitz')

It works fine under Python 3.4 interpreter:
>>> import fitz
>>>

But under Python 3.8 I get an exception:
>>> import fitz
Traceback(...
....
....
ImportError: DLL load failed while importing _fitz
>>>

I work under Windows7 64bit with Python 32bit. Can anyone help?

--Jach

Re: Importlib behaves differently when importing pyd file

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: die...@handshake.de (Dieter Maurer)
Newsgroups: comp.lang.python
Subject: Re: Importlib behaves differently when importing pyd file
Date: Wed, 16 Nov 2022 18:11:52 +0100
Lines: 26
Message-ID: <mailman.1000.1668618721.20444.python-list@python.org>
References: <6d86c0bd-0832-4279-bad8-f049951454b9n@googlegroups.com>
<25461.6616.640478.596683@ixdm.fritz.box>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de l2BSELMB725phWjS62MONAZ3nzXTpHamtRLpv71dfO/w==
Return-Path: <dieter@handshake.de>
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; 'looks': 0.02; 'this:':
0.03; '3.8': 0.05; 'subject:when': 0.07; 'cc:addr:python-list':
0.09; 'cc:no real name:2**0': 0.14; 'import': 0.15; '3.4': 0.16;
'3.8.': 0.16; '>>>>': 0.16; 'dll': 0.16; 'importing': 0.16;
'skip:> 10': 0.16; 'skip:> 20': 0.16; 'python': 0.16;
'cc:addr:python.org': 0.20; 'subject:file': 0.22; 'version': 0.23;
'received:de': 0.23; 'cc:2**0': 0.25; 'package': 0.34; 'header:In-
Reply-To:1': 0.34; 'failed': 0.35; 'fine': 0.35; 'directory':
0.37; 'wrote': 0.39; 'load': 0.62; 'your': 0.64;
'header:Received:6': 0.67; 'received:88': 0.84
In-Reply-To: <6d86c0bd-0832-4279-bad8-f049951454b9n@googlegroups.com>
X-Mailer: VM 8.0.12-devo-585 under 21.4 (patch 24) "Standard C" XEmacs Lucid
(x86_64-linux-gnu)
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: <25461.6616.640478.596683@ixdm.fritz.box>
X-Mailman-Original-References: <6d86c0bd-0832-4279-bad8-f049951454b9n@googlegroups.com>
 by: Dieter Maurer - Wed, 16 Nov 2022 17:11 UTC

Jach Feng wrote at 2022-11-15 22:52 -0800:
>My working directory d:\Works\Python\ has a package 'fitz' looks like this:
>
>....fitz\
>........__init__.py
>........fitz.py
>........utils.py
>........_fitz.pyd
>
>There is a statement in fitz.py:
>....return importlib.import_module('fitz._fitz')
>
>It works fine under Python 3.4 interpreter:
>>>> import fitz
>>>>
>
>But under Python 3.8 I get an exception:
>>>> import fitz
>Traceback(...
>...
>...
>ImportError: DLL load failed while importing _fitz
>>>>

The Python C-API is Python version dependent.
Your `_fitz.pyd` may need to be recreated for Python 3.8.

Re: Importlib behaves differently when importing pyd file

<022a4b1a-696a-4c54-89b1-d36748137803n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:622a:1309:b0:3a5:def:19fe with SMTP id v9-20020a05622a130900b003a50def19femr767530qtk.175.1668653938766;
Wed, 16 Nov 2022 18:58:58 -0800 (PST)
X-Received: by 2002:a05:6870:2404:b0:13b:a68d:6185 with SMTP id
n4-20020a056870240400b0013ba68d6185mr311777oap.177.1668653938320; Wed, 16 Nov
2022 18:58:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.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: Wed, 16 Nov 2022 18:58:58 -0800 (PST)
In-Reply-To: <mailman.1000.1668618721.20444.python-list@python.org>
Injection-Info: google-groups.googlegroups.com; posting-host=218.166.10.173; posting-account=G2sM6AoAAADOlDdo9rWD6sFkj3T5ULsz
NNTP-Posting-Host: 218.166.10.173
References: <25461.6616.640478.596683@ixdm.fritz.box> <6d86c0bd-0832-4279-bad8-f049951454b9n@googlegroups.com>
<mailman.1000.1668618721.20444.python-list@python.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <022a4b1a-696a-4c54-89b1-d36748137803n@googlegroups.com>
Subject: Re: Importlib behaves differently when importing pyd file
From: jfo...@ms4.hinet.net (Jach Feng)
Injection-Date: Thu, 17 Nov 2022 02:58:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2295
 by: Jach Feng - Thu, 17 Nov 2022 02:58 UTC

Dieter Maurer 在 2022年11月17日 星期四凌晨1:12:20 [UTC+8] 的信中寫道:
> Jach Feng wrote at 2022-11-15 22:52 -0800:
> >My working directory d:\Works\Python\ has a package 'fitz' looks like this:
> >
> >....fitz\
> >........__init__.py
> >........fitz.py
> >........utils.py
> >........_fitz.pyd
> >
> >There is a statement in fitz.py:
> >....return importlib.import_module('fitz._fitz')
> >
> >It works fine under Python 3.4 interpreter:
> >>>> import fitz
> >>>>
> >
> >But under Python 3.8 I get an exception:
> >>>> import fitz
> >Traceback(...
> >...
> >...
> >ImportError: DLL load failed while importing _fitz
> >>>>
> The Python C-API is Python version dependent.
> Your `_fitz.pyd` may need to be recreated for Python 3.8.
It seems that I have to install pymupdf to use fitz. Thank you.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor