Re: [IronPython] Debugging IronPython script code

2008-10-12 Thread Rainer Worbis
Now is't working partly - i used a app.config   which apearently does not setup debugging right.

What is not working is that I get only a disassembly  - no source code
attached.

Is there something to setup before?

 

Rainer

 

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Montag, 13. Oktober 2008 07:15
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

 

Oh, sorry, it looks like it needs to be a bool, not "true" in quotes...
With that in mind this works for me:

 

Dictionary options = new
Dictionary();

options["Debug"] = true;

ScriptEngine engine = Python.CreateEngine(options);

ScriptSource source =
engine.CreateScriptSourceFromFile("C:\\Users\\Dino\\test.py");

source.Execute();

 

I can put breakpoints in test.py and hit them.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 10:02 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging IronPython script code

 

No - i get the Call Stack showed below 

 

[Lightweight Function] 

>
Microsoft.Scripting.dll!Microsoft.Scripting.Runtime.OptimizedScriptCode.
InvokeTarget(Microsoft.Linq.Expressions.LambdaExpression code =
{Microsoft.Linq.Expressions.Expression}, Microsoft.Scripting.Runtime.Scope scope =
{Microsoft.Scripting.Runtime.Scope}) + 0x1c6 bytes   

 
Microsoft.Scripting.dll!Microsoft.Scripting.ScriptCode.Run(Microsoft.Scr
ipting.Runtime.Scope scope = {Microsoft.Scripting.Runtime.Scope}) + 0x42
bytes

 
Microsoft.Scripting.dll!Microsoft.Scripting.Hosting.CompiledCode.Execute
(Microsoft.Scripting.Hosting.ScriptScope scope =
{Microsoft.Scripting.Hosting.ScriptScope}) + 0x77 bytes 

...

 

Rainer

 

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Montag, 13. Oktober 2008 06:55
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

 

If you right click in the call stack window and check Show External Code
do you see the code then?

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 9:53 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging IronPython script code

 

I got as far as that - when the breakpoint is hit - VS pops up but not
in some python code but in the call  to Execute - the python code is
marked as external code.

So is there a possibility to have VS show the script code?

 

Rainer

 

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Sonntag, 12. Oktober 2008 21:21
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

 

You can set DebugMode = true on a ScriptRuntimeSetup object.  If you're
using the Python class you can pass a Dictionary object to CreateRuntime
with "Debug" = "true" and we'll set it for you.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 12:10 PM
To: Users@lists.ironpython.com
Subject: [IronPython] Debugging IronPython script code

 

Hallo all,

 

is there a possibility to debug IronPython code that is executed with
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?

Setting breakpoints in the python code will can be done by
System.Diagnostics.Debugger.Break() - the code breaks but I don't know
how to tell VS to get into my code.

 

Rainer

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] "Merlin" tutorial not working

2008-10-12 Thread Jeff Slutter
I'm going through the IronPython tutorial and I'm at the COM interop
part. I'm trying to get the Merlin example working but I can't get it
past a certain part.

First of all, I had to make some changes to get the example to work, as
it doesn't appear the tuple/out param stuff works the same as it does in
the tutorial.

Here is my code:

agentServer = AgentServerClass();
characterId = clr.Reference[int]();
reqId = clr.Reference[int]();   

agentServer.Load("Merlin.acs", characterId, reqId); 
myMerlinCharacter = clr.Reference[object]();

agentServer.GetCharacter(characterId.Value,myMerlinCharacter);
merlinCharacter = myMerlinCharacter.Value;

merlinCharacter.Show(0);

The exception happens when calling .GetCharacter. The error is:
An unhandled exception of type 'System.ArgumentException' occurred in
Microsoft.Scripting.Core.dll

Additional information: Could not convert argument 4294967295 for call
to GetCharacter.


Any ideas?
-Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging IronPython script code

2008-10-12 Thread Dino Viehland
Oh, sorry, it looks like it needs to be a bool, not "true" in quotes...  With 
that in mind this works for me:

Dictionary options = new Dictionary();
options["Debug"] = true;
ScriptEngine engine = Python.CreateEngine(options);
ScriptSource source = 
engine.CreateScriptSourceFromFile("C:\\Users\\Dino\\test.py");
source.Execute();

I can put breakpoints in test.py and hit them.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 10:02 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging IronPython script code

No - i get the Call Stack showed below

[Lightweight Function]
>
> Microsoft.Scripting.dll!Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(Microsoft.Linq.Expressions.LambdaExpression
>  code = 
> {Microsoft.Linq.Expressions.Expression},
>  Microsoft.Scripting.Runtime.Scope scope = 
> {Microsoft.Scripting.Runtime.Scope}) + 0x1c6 bytes

Microsoft.Scripting.dll!Microsoft.Scripting.ScriptCode.Run(Microsoft.Scripting.Runtime.Scope
 scope = {Microsoft.Scripting.Runtime.Scope}) + 0x42 bytes

Microsoft.Scripting.dll!Microsoft.Scripting.Hosting.CompiledCode.Execute(Microsoft.Scripting.Hosting.ScriptScope
 scope = {Microsoft.Scripting.Hosting.ScriptScope}) + 0x77 bytes
...

Rainer

Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Montag, 13. Oktober 2008 06:55
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

If you right click in the call stack window and check Show External Code do you 
see the code then?

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 9:53 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging IronPython script code

I got as far as that - when the breakpoint is hit - VS pops up but not in some 
python code but in the call  to Execute - the python code is marked as external 
code.
So is there a possibility to have VS show the script code?

Rainer

Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Sonntag, 12. Oktober 2008 21:21
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

You can set DebugMode = true on a ScriptRuntimeSetup object.  If you're using 
the Python class you can pass a Dictionary object to CreateRuntime with "Debug" 
= "true" and we'll set it for you.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 12:10 PM
To: Users@lists.ironpython.com
Subject: [IronPython] Debugging IronPython script code

Hallo all,

is there a possibility to debug IronPython code that is executed with 
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?
Setting breakpoints in the python code will can be done by 
System.Diagnostics.Debugger.Break() - the code breaks but I don't know how to 
tell VS to get into my code.

Rainer

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging IronPython script code

2008-10-12 Thread Rainer Worbis
No - i get the Call Stack showed below 

 

[Lightweight Function] 

>
Microsoft.Scripting.dll!Microsoft.Scripting.Runtime.OptimizedScriptCode.
InvokeTarget(Microsoft.Linq.Expressions.LambdaExpression code =
{Microsoft.Linq.Expressions.Expression}, Microsoft.Scripting.Runtime.Scope scope =
{Microsoft.Scripting.Runtime.Scope}) + 0x1c6 bytes   

 
Microsoft.Scripting.dll!Microsoft.Scripting.ScriptCode.Run(Microsoft.Scr
ipting.Runtime.Scope scope = {Microsoft.Scripting.Runtime.Scope}) + 0x42
bytes

 
Microsoft.Scripting.dll!Microsoft.Scripting.Hosting.CompiledCode.Execute
(Microsoft.Scripting.Hosting.ScriptScope scope =
{Microsoft.Scripting.Hosting.ScriptScope}) + 0x77 bytes 

...

 

Rainer

 

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Montag, 13. Oktober 2008 06:55
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

 

If you right click in the call stack window and check Show External Code
do you see the code then?

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 9:53 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging IronPython script code

 

I got as far as that - when the breakpoint is hit - VS pops up but not
in some python code but in the call  to Execute - the python code is
marked as external code.

So is there a possibility to have VS show the script code?

 

Rainer

 

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Sonntag, 12. Oktober 2008 21:21
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

 

You can set DebugMode = true on a ScriptRuntimeSetup object.  If you're
using the Python class you can pass a Dictionary object to CreateRuntime
with "Debug" = "true" and we'll set it for you.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 12:10 PM
To: Users@lists.ironpython.com
Subject: [IronPython] Debugging IronPython script code

 

Hallo all,

 

is there a possibility to debug IronPython code that is executed with
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?

Setting breakpoints in the python code will can be done by
System.Diagnostics.Debugger.Break() - the code breaks but I don't know
how to tell VS to get into my code.

 

Rainer

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging IronPython script code

2008-10-12 Thread Dino Viehland
If you right click in the call stack window and check Show External Code do you 
see the code then?

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 9:53 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging IronPython script code

I got as far as that - when the breakpoint is hit - VS pops up but not in some 
python code but in the call  to Execute - the python code is marked as external 
code.
So is there a possibility to have VS show the script code?

Rainer

Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Sonntag, 12. Oktober 2008 21:21
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

You can set DebugMode = true on a ScriptRuntimeSetup object.  If you're using 
the Python class you can pass a Dictionary object to CreateRuntime with "Debug" 
= "true" and we'll set it for you.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 12:10 PM
To: Users@lists.ironpython.com
Subject: [IronPython] Debugging IronPython script code

Hallo all,

is there a possibility to debug IronPython code that is executed with 
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?
Setting breakpoints in the python code will can be done by 
System.Diagnostics.Debugger.Break() - the code breaks but I don't know how to 
tell VS to get into my code.

Rainer

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging IronPython script code

2008-10-12 Thread Rainer Worbis
I got as far as that - when the breakpoint is hit - VS pops up but not
in some python code but in the call  to Execute - the python code is
marked as external code.

So is there a possibility to have VS show the script code?

 

Rainer

 

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dino Viehland
Gesendet: Sonntag, 12. Oktober 2008 21:21
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging IronPython script code

 

You can set DebugMode = true on a ScriptRuntimeSetup object.  If you're
using the Python class you can pass a Dictionary object to CreateRuntime
with "Debug" = "true" and we'll set it for you.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 12:10 PM
To: Users@lists.ironpython.com
Subject: [IronPython] Debugging IronPython script code

 

Hallo all,

 

is there a possibility to debug IronPython code that is executed with
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?

Setting breakpoints in the python code will can be done by
System.Diagnostics.Debugger.Break() - the code breaks but I don't know
how to tell VS to get into my code.

 

Rainer

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] LeeBeLLuL and Google App EngineIronPython,

2008-10-12 Thread Gerard Mulot
A demo of LeeBeLLuL with Google App Engine is available.

 

 
http://www.leebellul.com/Site/APPLICATIONS/Ressources_Humaines_V1.html

 

Regards
LeeBeLLuL

 

 

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging IronPython script code

2008-10-12 Thread Dino Viehland
You can set DebugMode = true on a ScriptRuntimeSetup object.  If you're using 
the Python class you can pass a Dictionary object to CreateRuntime with "Debug" 
= "true" and we'll set it for you.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer Worbis
Sent: Sunday, October 12, 2008 12:10 PM
To: Users@lists.ironpython.com
Subject: [IronPython] Debugging IronPython script code

Hallo all,

is there a possibility to debug IronPython code that is executed with 
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?
Setting breakpoints in the python code will can be done by 
System.Diagnostics.Debugger.Break() - the code breaks but I don't know how to 
tell VS to get into my code.

Rainer

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Debugging IronPython script code

2008-10-12 Thread Rainer Worbis
Hallo all,

 

is there a possibility to debug IronPython code that is executed with
ScriptSource.Execute or CompiledCode.Execute within VisualStudio?

Setting breakpoints in the python code will can be done by
System.Diagnostics.Debugger.Break() - the code breaks but I don't know
how to tell VS to get into my code.

 

Rainer

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debug IP script embedded in c# application

2008-10-12 Thread Dino Viehland
Did you set DebugMore = true on a ScriptRuntimeSetup object?  If you're using 
the Python class you can pass a Dictionary object to CreateRuntime with "Debug" 
= "true" and we'll set it for you.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yongming
Sent: Sunday, October 12, 2008 5:50 AM
To: users@lists.ironpython.com
Subject: [IronPython] Debug IP script embedded in c# application

Hello, I tried to extend my c# application with IronPython 2.0
scripts.
So an IDE was wanted to debug the scripts.
I tried the ways Michael mentioned here, but it didn't work for me.
http://tech-michael.blogspot.com/2008/07/i-was-charged-by-company-i-work-for-to.html
Did anyone tried his way, did it worked with IP 2.0?
Or any other tools I can use to debug my scripts?
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Debug IP script embedded in c# application

2008-10-12 Thread Yongming
Hello, I tried to extend my c# application with IronPython 2.0
scripts.
So an IDE was wanted to debug the scripts.
I tried the ways Michael mentioned here, but it didn't work for me.
http://tech-michael.blogspot.com/2008/07/i-was-charged-by-company-i-work-for-to.html
Did anyone tried his way, did it worked with IP 2.0?
Or any other tools I can use to debug my scripts?
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Problem with random module in IPY 1.1.1

2008-10-12 Thread Asaf Kleinbort
Hi,

We have encountered two strange errors in the 'random' module:

1.   At some point the random method 'getrandbits(63)' started (and
kept) returning 0 - until we restarted the application.

2.   The random method 'shuffle' when applied on a list kept returning
the same ordered list. Again - restarting the application solved the problem

An interesting remark is that issue #1 happened to us today in two different
applications, around the same time.

Any ideas?

Thanks,

Asaf 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com