Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104026
| X-Received | by 10.107.3.24 with SMTP id 24mr5611166iod.12.1457089731824; Fri, 04 Mar 2016 03:08:51 -0800 (PST) |
|---|---|
| X-Received | by 10.50.78.131 with SMTP id b3mr103309igx.5.1457089731801; Fri, 04 Mar 2016 03:08:51 -0800 (PST) |
| Path | csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!hb3no11267600igb.0!news-out.google.com!pn7ni9326igb.0!nntp.google.com!hb3no11267580igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Fri, 4 Mar 2016 03:08:51 -0800 (PST) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=36.238.99.47; posting-account=G2sM6AoAAADOlDdo9rWD6sFkj3T5ULsz |
| NNTP-Posting-Host | 36.238.99.47 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <3f342ec1-c6cd-49a8-aca2-2eac21fbbd79@googlegroups.com> (permalink) |
| Subject | Any comment on using ctypesgen package? |
| From | jfong@ms4.hinet.net |
| Injection-Date | Fri, 04 Mar 2016 11:08:51 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Lines | 26 |
| Xref | csiph.com comp.lang.python:104026 |
Show key headers only | View raw
I try to test this package but with no luck. This module was written for Python 2.x but mine is 3.4 so I use the 2To3 to "upgrade" it first (it seems OK). Then I run "python setup.py install" and get the following error:
...
...
File "D:\Patch\ctypesgen-master\ctypesgencore\parser\lex.py", line 41, in <module>
_INSTANCETYPE = types.InstanceType
AttributeError: 'module' object has no attribute 'InstanceType'
Below is the troubled codes in file lex.py:
Note: In original codes (before 2To3 modify), there is "types.ObjectType" instead of "object".
---------
# Available instance types. This is used when lexers are defined by a class.
# It's a little funky because I want to preserve backwards compatibility
# with Python 2.0 where types.ObjectType is undefined.
try:
_INSTANCETYPE = (types.InstanceType, object)
except AttributeError:
_INSTANCETYPE = types.InstanceType
class object: pass # Note: needed if no new-style classes present
-----------
The author had put some comments above these codes but I have no idea what he is talking about.
There is someone who had encountered the same problem last year and raise a question at its home page, but the author seems has no interest on doing anything on it anymore.
https://github.com/davidjamesca/ctypesgen/issues/53
Does anyone know how to fix it? or the whole job will be a mission impossible if no help from its author?
--Jach
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Any comment on using ctypesgen package? jfong@ms4.hinet.net - 2016-03-04 03:08 -0800
Re: Any comment on using ctypesgen package? Chris Angelico <rosuav@gmail.com> - 2016-03-04 23:00 +1100
Re: Any comment on using ctypesgen package? Peter Otten <__peter__@web.de> - 2016-03-04 13:35 +0100
Re: Any comment on using ctypesgen package? jfong@ms4.hinet.net - 2016-03-04 21:35 -0800
Re: Any comment on using ctypesgen package? Chris Angelico <rosuav@gmail.com> - 2016-03-05 16:49 +1100
Re: Any comment on using ctypesgen package? jfong@ms4.hinet.net - 2016-03-05 00:14 -0800
Re: Any comment on using ctypesgen package? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-05 11:59 +0000
Re: Any comment on using ctypesgen package? jfong@ms4.hinet.net - 2016-03-06 16:57 -0800
csiph-web