<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Le 14/09/11 10:13, Vincent Vande Vyvre a écrit :
<blockquote cite="mid:4E70621B.2000408@swing.be" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
Le 14/09/11 08:20, Arnaud Delobelle a écrit :
<blockquote
cite="mid:CAJ6cK1auQiCvybApGMJwRbiat1_ABNmyq+n9t3V0soW9AZ++Fg@mail.gmail.com"
type="cite">
<pre wrap="">On 14 September 2011 06:53, Vincent Vande Vyvre
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:vincent.vandevyvre@swing.be"><vincent.vandevyvre@swing.be></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi, trying your code, I have had numbers of errors:
</pre>
</blockquote>
<pre wrap="">Hi Vincent, thanks for trying it.
</pre>
<blockquote type="cite">
<pre wrap=""> File "unpyc3.py", line 55, in <module>
SETUP_WITH,
NameError: name 'SETUP_WITH' is not defined
commented it
File "unpyc3.py", line 58, in <module>
STORE_DEREF, DELETE_DEREF,
NameError: name 'DELETE_DEREF' is not defined
commented it
</pre>
</blockquote>
<pre wrap="">What version of Python are you running this on? This is module is
written for Python 3. It looks like you're using an old version of
Python (before the with statement was introduced - 2.5?)
</pre>
<blockquote type="cite">
<pre wrap=""> File "unpyc3.py", line 96, in dec_module
stream = open(pyc_path, "rb")
UnboundLocalError: local variable 'pyc_path' referenced before assignment
change pyc_path to path
</pre>
</blockquote>
<pre wrap="">Thanks, I've fixed that.
--
Arnaud
</pre>
</blockquote>
Python 3.1.2 (r312:79147, Sep 27 2010, 09:45:41) <br>
[GCC 4.4.3] on linux2<br>
Type "help", "copyright", "credits" or "license" for more
information.<br>
<br>
I'll retry later on an other pc where I have a v.3.2<br>
<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a moz-do-not-send="true" href="https://launchpad.net/oqapy">Oqapy</a>
. <a moz-do-not-send="true"
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
moz-do-not-send="true" href="https://launchpad.net/paqager">PaQager</a></div>
</blockquote>
<br>
Python 3.2.1 (default, jul 11 2011, 12:37:47) <br>
[GCC 4.6.1] on linux2<br>
Type "help", "copyright", "credits" or "license" for more
information.<br>
<br>
This one on Archlinux<br>
<br>
Again the last error:<br>
<br>
File "unpyc3.py", line 211, in __init__<br>
for v in code_obj.co_cellvars + code_obj.co_freevars]<br>
AttributeError: 'NoneType' object has no attribute 'co_cellvars'<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a href="https://launchpad.net/oqapy">Oqapy</a> . <a
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
href="https://launchpad.net/paqager">PaQager</a></div>
</body>
</html>