Oh i see, thanks for explaining Curt. I should have dug a little deeper myself, but usually its me doing something stupid and not a bug. I assumed it was my fault =) I&#39;ll open a ticket.<br><br><div class="gmail_quote">

On 29 December 2011 16:15, Curt Hagenlocher <span dir="ltr">&lt;<a href="mailto:curt@hagenlocher.org">curt@hagenlocher.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>This looks like a bug in IronPython when deriving a class from int. Here&#39;s a simple repro; file a bug!</div><div> </div><div>In IronPython 2.7.1,</div><div> </div><div>&gt;&gt;&gt; class Integer(int):<br>...     def __init__(self, value):<br>


...         int.__init__(value)<br>...<br>&gt;&gt;&gt; Integer(10)<br>10<br>&gt;&gt;&gt; Integer(&#39;10&#39;)<div class="im"><br>Traceback (most recent call last):<br></div>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<div class="im">

<br>TypeError: expected int, got str<br></div>
&gt;&gt;&gt; int(&#39;10&#39;)<br>10<br>&gt;&gt;&gt;</div><div> </div><div>In Python 2.6,</div><div>&gt;&gt;&gt; class Integer(int):<br>...     def __init__(self, value):<br>...         int.__init__(value)<br>...<br>&gt;&gt;&gt; Integer(10)<br>


10<br>&gt;&gt;&gt; Integer(&#39;10&#39;)<br>10<br>&gt;&gt;&gt; int(&#39;10&#39;)<br>10<br>&gt;&gt;&gt;<br></div><div class="gmail_quote"><div><div class="h5">On Thu, Dec 29, 2011 at 7:30 AM, Chris <span dir="ltr">&lt;<a href="mailto:phatfish@gmail.com" target="_blank">phatfish@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div><div class="h5"><div>Hi,</div><div> </div>

<div>Can anyone explain this bellow. Does PyPDF use some unsported part of the standard lib? Because there are no external modules required for it.</div>
<div>On another note, is there a way for the &quot;Execute Project in Python Interactive&quot; to use the vanilla Python interpreter rather than the IronPython one. I cant see a way to change this?</div>

<div> </div><div>Thanks</div><div> </div><div><b>Python 2.7 Interactive Window</b></div><div> </div><div> Resetting execution engine<br>&gt;&gt;&gt; from pyPdf import PdfFileReader<br>&gt;&gt;&gt; pdf = PdfFileReader(open(&#39;D:/Chris/Documents/sorting/short numbers/2370.pdf&#39;, &#39;rb&#39;))<br>




&gt;&gt;&gt; print &#39;test&#39;<br>test<br>&gt;&gt;&gt; </div><div> </div><div><b>IronPython 2.7 Interactive Window</b></div><div> </div><div>&gt;&gt;&gt; from pyPdf import PdfFileReader<br>&gt;&gt;&gt; pdf = PdfFileReader(open(&#39;D:/Chris/Documents/sorting/short numbers/2370.pdf&#39;, &#39;rb&#39;))<br>




Traceback (most recent call last):<br>  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;<br>  File &quot;C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\pdf.py&quot;, line 374, in __init__<br>    self.read(stream)<br>




  File &quot;C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\pdf.py&quot;, line 732, in read<br>    num = readObject(stream, self)<br>  File &quot;C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\generic.py&quot;, line 87, in readObject<br>




    return NumberObject.readFromStream(stream)<br>  File &quot;C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\generic.py&quot;, line 236, in readFromStream<br>    return NumberObject(name)<br>TypeError: expected int, got str<br>




&gt;&gt;&gt; </div>
<br></div></div><div class="im">_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org" target="_blank">Ironpython-users@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">http://mail.python.org/mailman/listinfo/ironpython-users</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>