[Ironpython-users] IronPython, Daily Digest 9/12/2011

no_reply at codeplex.com no_reply at codeplex.com
Tue Sep 13 11:07:12 CEST 2011


Hi ironpython,

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

In today's digest:ISSUES

1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object.
2. [New issue] Exception is thrown when attempting to run pre-compiled code with sys.settrace enabled

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

ISSUES

1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object.
http://ironpython.codeplex.com/workitem/31439
User loocas has commented on the issue:

"Hi there,

great to hear about the patch! Is it available anywhere for download? I'd really appretiate if I could get my hands on it as I need to work with the shotgun_api quite a lot.

Thank you!"-----------------

2. [New issue] Exception is thrown when attempting to run pre-compiled code with sys.settrace enabled
http://ironpython.codeplex.com/workitem/31447
User dinov has proposed the issue:

"Pre-compile the standard library using this script:

import os
all_files = []
for dir, blah, files in os.walk('Lib'):
    if dir.startswith('Lib\\site-packages'):
        print('skipping', dir)
        continue
    
    for file in files:
        if file.endswith('.py'):
            all_files.append('C:\Program Files (x86)\IronPython 2.7\\' + dir + '\\' + file)


import clr
clr.CompileModules('C:\\Users\\dinov\\LibPy.dll', *all_files)    

Then compile and run this program w/ reference to pre-compiled code assembly:
using System;
using System.Collections.Generic;
using System.IO;
using IronPython.Hosting;
using IronPython.Runtime;

namespace ConsoleApplication1 {
    class Program {
        static void Main(string[] args) {
            var engine = Python.CreateEngine(new Dictionary<string, object>() { { "Debug", true }, {"ExceptionDetails",true} });
            engine.Runtime.LoadAssembly(typeof(System.Linq.Enumerable).Assembly);
            engine.Runtime.LoadAssembly(typeof(System.String).Assembly);
            engine.Runtime.LoadAssembly(typeof(System.Diagnostics.Process).Assembly);
            engine.Runtime.LoadAssembly(typeof(DLRCachedCode).Assembly);

            try {
                engine.Execute(@"
from os import path

import sys
def f(*args):
    return f

sys.settrace(f)

path.abspath('\\\\tkzaw-pro-11\\mydocs7\\dinov\\my documents\\visual studio 2010\\Projects\\PythonApplication46\\PythonApplication46\\Program.py')
def g(): pass

g()
");
            } catch(Exception e) {
                Console.WriteLine(e);
            }
            Console.ReadLine();

            
        }
    }
}


An exception is thrown trying to create a code which supports sys.settrace which we cannot do for pre-compiled code.  FunctionCode.UpdateDelegate probably needs to also check that the _lambda is not a SerializedScopeStatement which doesn't support being turned into sys.settrace debuggable code."
----------------------------------------------



----------------------------------------------
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/20110913/a5cc8264/attachment.html>


More information about the Ironpython-users mailing list