Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72550
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <roland@rptd.ch> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'scripts': 0.03; 'programmer': 0.03; 'broken': 0.04; 'subject:files': 0.09; 'subject:modules': 0.09; 'python': 0.11; 'assume': 0.14; 'filename:fname piece:signature': 0.16; 'finder': 0.16; 'received:192.168.1.20': 0.16; 'skip:) 30': 0.16; 'url:ch': 0.16; 'bit': 0.19; 'module': 0.19; 'import': 0.22; 'header:User- Agent:1': 0.23; 'error': 0.23; "i've": 0.25; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'code': 0.31; 'url:wiki': 0.31; '"",': 0.31; 'flags': 0.31; 'file': 0.32; 'class': 0.32; 'worked': 0.33; '(most': 0.33; 'totally': 0.33; 'skip:_ 10': 0.34; 'maybe': 0.34; 'subject:from': 0.34; 'could': 0.34; "can't": 0.35; 'anywhere': 0.35; 'problem.': 0.35; 'something': 0.35; 'but': 0.35; 'c++': 0.36; 'method': 0.36; 'useful': 0.36; 'wrong': 0.37; 'two': 0.37; 'to:addr:python-list': 0.38; 'recent': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'und': 0.40; 'further': 0.61; 'sincerely': 0.63; 'map': 0.64; 'total': 0.65; 'export': 0.74; 'url:php': 0.85; 'yours': 0.88 |
| Date | Tue, 03 Jun 2014 23:06:15 +0200 |
| From | Roland Plüss <roland@rptd.ch> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Loading modules from files through C++ |
| References | <5376ACE7.8030706@rptd.ch> <ll7iu1$oge$1@ger.gmane.org> <53775D68.2010009@rptd.ch> <ll7o30$pc3$1@ger.gmane.org> <537768FB.7060303@rptd.ch> <ll7q3m$idv$1@ger.gmane.org> <53778005.8030105@rptd.ch> <ll80dl$bov$1@ger.gmane.org> <53778E22.3040701@rptd.ch> <ll84s5$5bd$1@ger.gmane.org> <53790CCF.1070905@rptd.ch> <CAPTjJmrOeSsmoxqk8iCL2tKEX9Qa1yHBLzfbfvNr_7Ap+AP6pg@mail.gmail.com> <537B8E31.7000607@rptd.ch> <CAPTjJmrnjrfhd=nLKogVkdsm-_KzG6mRKrFbCVYhaXdv6-Ortw@mail.gmail.com> <537D2433.7080606@rptd.ch> <5380B137.2030106@rptd.ch> |
| In-Reply-To | <5380B137.2030106@rptd.ch> |
| X-Enigmail-Version | 1.6 |
| Content-Type | multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WLN6Wr1lkgsXgPxB7hVWuxxwPljOCtUna" |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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 | <http://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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10645.1401829890.18130.python-list@python.org> (permalink) |
| Lines | 61 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1401829890 news.xs4all.nl 2843 [2001:888:2000:d::a6]:58437 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:72550 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
I came now a bit further with Python 3 but I'm hitting a total
road-block right now with the importer in C++ which worked in Py2 but is
now totally broken in Py3. In general I've got a C++ class based module
which has two methods:
{ "find_module", ( PyCFunction )spModuleModuleLoader::cfFindModule,
METH_VARARGS, "Retrieve finder for a path." },
{ "load_module", ( PyCFunction )spModuleModuleLoader::cfLoadModule,
METH_VARARGS, "Load module for a path." },
An instance of this object is added to sys.meta_path
This is the same as with Py2. But in Py3 I get now this strange error
and everything breaks:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1523, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1477, in _find_module
SystemError: Bad call flags in PyCFunction_Call. METH_OLDARGS is no
longer supported!
This happenes whenever I try to import something. I never used
METH_OLDARGS anywhere so I assume something is broken inside python.
Maybe wrong error code for not finding some method or wrong arguments? I
can't find any useful documentation on what could cause this problem.
--
Yours sincerely
Plüss Roland
Leader and Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch/wiki )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )
- As well as various Blender export scripts und game tools
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Loading modules from files through C++ Roland Plüss <roland@rptd.ch> - 2014-06-03 23:06 +0200
csiph-web