Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New comment] Import modules from a zip archive containing non-ASCII
characters does not work
2. [New comment] Importing .NET types causes ImportExceptions (zipimport
handler)
3. [Status update] Setting the StdLib path
----------------------------------------------
ISSUES
1. [New comment] Import modules from a zip archive containing non-ASCII
characters does not work
http://ironpython.codeplex.com/workitem/34571
User vabe has commented on the issue:
"<p>Encoding is a first problem. <br>Second problem is in class
SourceStringContentProvider. It uses SourceCodeReader, that does not support
"Defining Python Source Code Encodings"
http://www.python.org/dev/peps/pep-0263/</p><p>Attched file contains changes
that work for me.</p><p>Changes:<br>1) Modified GetModuleCode (returns a byte
[] instead of string)<br>2) SourceStringContentProvider replaced by
MemoryStreamContentProvider (that uses
context.GetSourceReader(...))</p>"-----------------
2. [New comment] Importing .NET types causes ImportExceptions (zipimport
handler)
http://ironpython.codeplex.com/workitem/34602
User slide_o_mix has commented on the issue:
"<p>FYI, the reason I need to throw an exception is this
code:</p><p>```<br>private static object FindImporterForPath(CodeContext/*!*/
context, string dirname) {<br> List pathHooks =
PythonContext.GetContext(context).GetSystemStateValue("path_hooks")
as List;</p><p> foreach (object hook in (IEnumerable)pathHooks)
{<br> try {<br> object handler =
PythonCalls.Call(context, hook, dirname);</p><p> if (handler
!= null) {<br> return handler;<br>
}<br> } catch (ImportException) {<br> // we
can't handle the path<br> }<br> }</p><p>#if
!SILVERLIGHT // DirectoryExists isn't implemented on Silverlight<br>
if
(!context.LanguageContext.DomainManager.Platform.DirectoryExists(dirname))
{<br> return new PythonImport.NullImporter(dirname);<br>
}<br>#endif</p><p> return null;<br> }<br>```</p><p>The
PythonCalls.Call calls the constructor of the zipimporter class, which means I
have to throw an exception (ImportException) to tell Importer.cs not to use me
as an importer. Any changes in that contract would require changes to core, and
it could impact Python based importer schemes.</p>"-----------------
3. [Status update] Setting the StdLib path
http://ironpython.codeplex.com/workitem/34627
User slide_o_mix has updated the issue:
Status has changed from Proposed to Closed with the following comment,
"Please use the mailing list for questions in the future. You can set the
search path on the engine.
ScriptEngine engine = Python.CreateEngine();
var searchPaths = new List<string>(engine.GetSearchPaths());
searchPaths.Add("/lib/ironpython/2.7.4");
engine.SetSearchPaths(searchPaths);"
----------------------------------------------
----------------------------------------------
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.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users