Ok,<div>I have patched the corresponding line:</div><div><br></div><div><div><div>19a20</div><div>> from System.Text import UTF8Encoding</div><div>283c284,288</div><div>< self._authkey = AuthenticationString(os.urandom(32))</div>
<div>---</div><div>> bytes = os.urandom(32)</div><div>> encoding=UTF8Encoding()</div><div>> if isinstance(bytes, str):</div><div>> bytes = encoding.GetBytes(bytes)</div><div>
> self._authkey = AuthenticationString(bytes)</div></div></div><div><br></div><div> but who can I add to my IronPython the _multiprocessing module ?</div><div>------------------------------------------------------------------</div>
<div><div>c:\temp>ipy test-ipy-multiprocessing.py</div><div>Traceback (most recent call last):</div><div> File "test-ipy-multiprocessing.py", line 1, in <module></div><div> File "c:\Program Files\IronPython 2.7\lib\site-packages\multiprocessing\__init__.py", line 83, in <module></div>
<div>ImportError: No module named _multiprocessing</div><div>------------------------------------------------------------------</div><div><br></div><div>Maybe It cannot be resolved that way.</div><div><br></div><div>Regards,</div>
<div><br></div><div>Romain</div><br><div class="gmail_quote">2011/3/23 Davy Mitchell <span dir="ltr"><<a href="mailto:daftspaniel@gmail.com">daftspaniel@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If it is a 'C' based extension then it won't directly work with IronPython.<br>
<br>
Maybe someone has a workaround / alternative?<br>
<br>
Cheers,<br>
Davy<br>
<div><div></div><div class="h5"><br>
On 23 March 2011 10:23, Romain Gilles <<a href="mailto:romain.gilles@gmail.com">romain.gilles@gmail.com</a>> wrote:<br>
> Hi,<br>
> First of all thanks for your answer :). But after updated<br>
> my IRONPYTHONPATH as follow:<br>
> set IRONPYTHONPATH=c:\Python27\Lib<br>
> I get this error:<br>
> -----------------------------------------<br>
> c:\temp>ipy test-ipy-multiprocessing.py<br>
> Traceback (most recent call last):<br>
> File "test-ipy-multiprocessing.py", line 1, in <module><br>
> File "c:\Python27\Lib\multiprocessing\__init__.py", line 63, in <module><br>
> File "c:\Python27\Lib\multiprocessing\process.py", line 286, in <module><br>
> File "c:\Python27\Lib\multiprocessing\process.py", line 283, in __init__<br>
> TypeError: expected IList[Byte], got str<br>
> -----------------------------------------<br>
> 2011/3/23 Oleksii Bidiuk <<a href="mailto:oleksii.bidiuk@gmail.com">oleksii.bidiuk@gmail.com</a>><br>
>><br>
>> Hi Romain,<br>
>> AFAIK you have to download the Python standard library separately. See<br>
>> e.g. <a href="http://www.ironpython.info/index.php/Using_the_Python_Standard_Library" target="_blank">http://www.ironpython.info/index.php/Using_the_Python_Standard_Library</a> for<br>
>> examples (I've done it a while ago, so had to Google around a bit).<br>
>><br>
>> 2011/3/23 Romain Gilles <<a href="mailto:romain.gilles@gmail.com">romain.gilles@gmail.com</a>><br>
>>><br>
>>> Hi all,<br>
>>> I'm trying to use this feature in ironpython. I just follow the first<br>
>>> sample:<br>
>>> --------------------------------------------<br>
>>> from multiprocessing import Process<br>
>>> def f(name):<br>
>>> print 'hello', name<br>
>>> if __name__ == '__main__':<br>
>>> p = Process(target=f, args=('bob',))<br>
>>> p.start()<br>
>>> p.join()<br>
>>> --------------------------------------------<br>
>>> But I get the following error when I'm executing it:<br>
>>> --------------------------------------------<br>
>>> c:\temp>ipy test-ipy-multiprocessing.py<br>
>>> Traceback (most recent call last):<br>
>>> File "test-ipy-multiprocessing.py", line 1, in <module><br>
>>> ImportError: No module named multiprocessing<br>
>>> --------------------------------------------<br>
>>> Thanks for any help.<br>
>>> Regards.<br>
>>> Romain.<br>
>>> PS: I have just installed the last release of IronPython 2.7<br>
>>> --------------------------------------------<br>
>>> c:\temp>ipy -V<br>
>>> PythonContext 2.7.0.40 on .NET 4.0.30319.1<br>
>>> --------------------------------------------<br>
>>> _______________________________________________<br>
>>> Users mailing list<br>
>>> <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
>>> <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> oleksii<br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
> <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
</div></div><font color="#888888">--<br>
Davy's Blog - <a href="http://daftspaniel.wordpress.com" target="_blank">http://daftspaniel.wordpress.com</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</div></div></blockquote></div><br></div>