This works for me in IronPython 2.0B2:
using System;
using System.Reflection;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
class Test {
public static void Main(string[]args) {
ScriptRuntime runtime = ScriptRuntime.Create();
ScriptEngine engine = runti
Hi,
After getting Python code to work successfully, I decided to quickly
import the CLR and access some .Net objects. At this point my code
blew up.
The code I tried to execute was "import clr".
Exception is this:
Unhandled Exception System.NullReferenceException: Object reference
not set to an
Probably has to do with binding context. This means that assemblies
loaded via LoadFile, LoadFrom and Load don't necessarily "see"
assemblies loaded in other contexts. See
http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx for more
info.
You also might try just changing to LoadFrom, Lo
Hello,
I have an interesting problem and I was wondering if you would be able
to help. I am trying to load the IronPython assemblies dynamically
(IronPython.dll and IronPython.Modules.dll), and what I am doing is
this:
Assembly.LoadFile(Path.Combine(Settings.BinDirectory, assembly));
I'm then c
I think this really means that file is not thread safe. I agree that it should
be thread safe, I've opened CodePlex bug 16623
(http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=16623) to
track the issue. Thanks for the report!
-Original Message-
From: [EMAIL PROTECTED]
Sakesun Roykiattisak wrote:
Hi,
Just found that the "print" statement is not thread-safe (IP
1.1.1). I variably
get various "ValueError" like "Count cannot be less than zero.
Parameter name: count"
in my multi-thread app.
FWIW we've sometimes seen this, although it is hard to reproduce