Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72550 > unrolled thread
| Started by | Roland Plüss <roland@rptd.ch> |
|---|---|
| First post | 2014-06-03 23:06 +0200 |
| Last post | 2014-06-03 23:06 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Loading modules from files through C++ Roland Plüss <roland@rptd.ch> - 2014-06-03 23:06 +0200
| From | Roland Plüss <roland@rptd.ch> |
|---|---|
| Date | 2014-06-03 23:06 +0200 |
| Subject | Re: Loading modules from files through C++ |
| Message-ID | <mailman.10645.1401829890.18130.python-list@python.org> |
[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 top | Article view | comp.lang.python
csiph-web