[Ironpython-users] IronPython, Daily Digest 7/13/2014

CodePlex no_reply at codeplex.com
Mon Jul 14 09:22:52 CEST 2014


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] IronPython throw InsufficientMemoryException when using numpy in threads
2. [New issue] support for running content of zip file

----------------------------------------------

ISSUES

1. [New issue] IronPython throw InsufficientMemoryException when using numpy in threads
http://ironpython.codeplex.com/workitem/35378
User elishao has proposed the issue:

"I have some IronPython code that being called from within a C# application.
This code worked fine until I decided to change one function to run in a thread.
when numpy functions called in a python thread a InsufficientMemoryException exception is thrown.
I Searched for solutions but didn't find. can someone explain why it is happening and how can I fix it?

I think this is happening only when I have two threads that use numpy

I run code like this:

C#:
_python.functionA(); # _python was created with "Python.CreateEngine()"
_python.functionA(); # twice on purpose


Python:
import threading
import time
import numpy

def blah():    
    print numpy.array([100,100,0])

def functionA():
    t = threading.Timer(0,blah)    
    t.start()
    time.sleep(2)


And I got this Exception:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "c:\Program Files\IronPython 2.7.1\Lib\threading.py", line 552, in _Thread__bootstrap_inner
    self.run()
  File "c:\Program Files\IronPython 2.7.1\Lib\threading.py", line 756, in run
    self.function(*self.args, **self.kwargs)
  File "C:\workspace\my_python_script.py", line 113, in blah
    print numpy.array([100,100,0])
MemoryError: Exception of type 'System.InsufficientMemoryException' was thrown.


This is on Windows 7. 32bit. 4G RAM. quad core."-----------------

2. [New issue] support for running content of zip file
http://ironpython.codeplex.com/workitem/35379
User paweljasinski has proposed the issue:

"This is cpython vs. ironpython difference, which is used by script option of distlib
$ cat __main__.py
print __file__
print __name__

$ zip aaa.zip __main__.py
  adding: __main__.py (deflated 20%)

$ python aaa.zip
aaa.zip/__main__.py
__main__

$ ipy aaa.zip
  File "aaa.zip", line
SyntaxError: Non-ASCII character '\xb8' in file aaa.zip on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
"
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140714/9cf6e6ba/attachment.html>


More information about the Ironpython-users mailing list