Another alternative is:
ClrModule clr = (ClrModule)engine.Import("clr");
clr.AddReference(typeof(SomeAutoCadType).Assembly);
This is similar to doing
"engine.LoadAssembly(typeof(SomeAutoCadType).Assembly)", but is more robust
since it also updates "clr.References". PythonEngine.LoadAssembly sho
__name___ == "__main__": is a convention
enforced by ipy.exe. The PythonEngine itself does not directly support this
concept. However, you can achieve that result (just like ipy.exe does) by using
code like this:
PythonEngine engine = new PythonEngine();
EngineModule module = engine.Cr
If EngineOptions.ClrDebuggingEnabled is set, we use AssemblyBuilder,
TypeBuilder, etc for PythonEngine.Executed. The code generated by AssemblyBuilder,
TypeBuilder, etc supports PDB debug information tracking for the methods, and
so you will be able to set breakpoints in the code. However,
You can try the PythonEngine.CreateOptimizedModule which you can
also pass a name your module should get. Let us know if that doesn’t meet your
needs.
Martin
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Riley
Sent: Thursday, August 10, 2006 2:17 PM
To: Discus
There is also an Import method on the PythonEngine object that allows
you to import stuff programatically as well.
On 8/10/06, Kristof Wagemans <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Isn't engine.LoadAssembly(typeof(SomeAutoCadType).Assembly)
> easier or is this different in some way?
>
>
>
> _
Isn’t engine.LoadAssembly(typeof(SomeAutoCadType).Assembly)
easier or is this different in some way?
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland
Sent: Thursday 10 August 2006
21:17
To: Discussion
of IronPython
Subject: Re: [IronPython]
Embedding
I've tested that and I don't think it works with:if __name___ == "__main__":in the python script.Regards,Tim RileyOn 8/10/06,
Martin Maly <[EMAIL PROTECTED]> wrote:
Think PythonEngine.ExecuteFile may work for you.
From:
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On
Behalf Of
I have been experimenting with the debugging support for the
PythonEngine. When I use the following code I have several problems.
PythonEngine _pe;
EngineOptions options = new EngineOptions();
options.ClrDebuggingEnabled = true;
_pe = new PythonEngine(options);
_pe.ExecuteFile(@"
Think PythonEngine.ExecuteFile may work for you.
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Riley
Sent: Thursday, August 10, 2006 1:01 PM
To: Discussion of IronPython
Subject: [IronPython] PythonEngine.RunFile
In IP version 0.9 there was a PythonEngine.R
Thanks Dino. I had figured that out.On 8/10/06, Dino Viehland <[EMAIL PROTECTED]> wrote:
Cool, looks like I was only close though J
You
may have already imported clr into the default module, but just for the record
for those who haven't you'll need an import clr there. I just realize
In IP version 0.9 there was a PythonEngine.RunFile() method, this seems to be gone in 1.0.6. Is there a replacement?
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Cool, looks like I was only close though J You
may have already imported clr into the default module, but just for the record
for those who haven’t you’ll need an import clr there. I just realized I
forgot it the 1st time, and I had a redundant “AddReference” in the
delegate call. I’m as
That's exactly what I needed. Thank you Dino.On 8/10/06, Dino Viehland <[EMAIL PROTECTED]
> wrote:
You can get the assembly object from an AutoCAD type:
typeof(Foo).Assembly. From there you just need to have one helper which
will register this in the engine, so you could do:
delega
You can get the assembly object from an AutoCAD type:
typeof(Foo).Assembly. From there you just need to have one helper which
will register this in the engine, so you could do:
delegate void AddReference(object assembly);
AddReference adr = engine.CreateMethod(“clr.AddReference(assemb
What I'm trying to do is sort of weird so let me see if I can elaborate further. I am embedding IronPython in a .NET assembly that will later be loaded into AutoCAD. AutoCAD has their own two .NET assemblies that must be referenced, "
acmgd.dll" and "acdbmgd.dll". These two assemblies are always lo
Adding references updates the entire engine, it’s not local to
just the current module. So once you have added a reference you just need to
import the namespace into any given module.
Were you also trying to avoid the import statements?
From:
[EMAIL PROTECTED] [mailto:[EMAIL PR
If I have an embedded project can I automatically make .NET assemblies referenced in the project available to my python scripts? For example I have two assemblies(not in the GAC) that I have referenced in my project. I would like them always available to all python files run from this program witho
As for the infinite loop ... it is a bug in our PowMod code. It is not an
actual infinite loop, but we just do the calculation very inefficiently. Filing
as a bug also.
Martin
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Maly
Sent: Thursday, A
This is a current limitation of IronPython implementation. I am filing it as a
bug for us to seriously investigate.
Thanks for your help with the repro!
Martin
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of HEMMI, Shigeru
Sent: Thursday, August 10, 200
I wrote:
The log file is attached.
Sorry, "A non-text attachment was scrubbed..." occured.
I resend the attachment file again with .txt extension.
C:\NZMATH-0.5.1>dir
2006/08/10 17:28 .
2006/08/10 17:28 ..
2006/08/08 20:42 4,214 CHANGES.txt
2006/08/08 20
Thanks for the answer.
I was able to take a log with -X:ExceptionDetail, but since Japanese,
log file includes Japanse characters; I removed them by hand. I was
not able to which numbers were involved. The log file is attached.
Please note that there are two problems; one is "ValueError: value
21 matches
Mail list logo