[IronPython] Don't execute files containing errors?

2010-02-18 Thread Alex Turpin
Hey all, I am currently embedding IronPython in a C# app of mine. I need to execute external script files, but to also be able to only executes the ones that will be error free. Here is an example script: a = "This is a test" print undefinedVariable b = "This is another test" If I execute this s

Re: [IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Dino Viehland
Yep, mywindow.Closing += myCloseHandler should work just fine. You might need to do call the event handler type if the conversion type doesn't automatically happen (but I think the conversion will happen automatically). From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironp

Re: [IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Ken MacDonald
Thanks, Curt! That looks interesting; I found a pretty explicit article on how the 'Closing' event works at: http://msdn.microsoft.com/en-us/library/ms748948.aspx (about 1/2 way down the page). It looks like an event handler similar to mine could be used to cancel the 'Closing' event and preser

Re: [IronPython] Internals documentation

2010-02-18 Thread Tristan Zajonc
Dino - Thanks, those links are helpful. Can I ask how you plan to merge the IronPython and Python documentation? In terms of using IronPython as a DSL for a specific application, this is an area I've been wondering about. Pointing users to the official CPython docs doesn't provide the nicest exp

Re: [IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Curt Hagenlocher
Anything that talks about "window messages" or "subclassing" is pretty-much incompatible with WPF. What you really want to do is handle the Closing event on the WPF Window object. This will give you the opportunity to cancel. On Thu, Feb 18, 2010 at 12:59 PM, Ken MacDonald wrote: > Thanks Dino,

Re: [IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Ken MacDonald
Thanks Dino, http://blogs.msdn.com/nickkramer/default.aspx?p=4 I found an example in the above blog, describing catching the WM_DESTROY event; page down to the article titled: Subclassing Window's WndProcThe handler for our WPF 'Clos

Re: [IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Dino Viehland
I assume there's just some event handler that you can hook up to a Python function. If you post the C# or VB code someone here can probably quickly translate it to IronPython. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Ken MacDonald Sent:

Re: [IronPython] Internals documentation

2010-02-18 Thread Dino Viehland
For the DLR side of things you might find the DLR discussions to be useful: http://dlr.codeplex.com/Thread/List.aspx This post to the mailing list might also be useful - it covers implementing new modules in .NET for IronPython: http://lists.ironpython.com/pipermail/users-ironpython.com/2009-No

[IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Ken MacDonald
Hi, Real new (since yesterday) to IronPython. I've just inherited a project in I-P/XAML/.NET and a big bug list to go with it. In our main app, we display a "Close" button; clicking it brings up a confirmation dialog and exits the app only if user clicks "yes, I want to quit". We'd like to have the

[IronPython] Internals documentation

2010-02-18 Thread Tristan Zajonc
Hi, I'm poking around the IronPython sources and am trying to understand how things works. I haven't found a good source of documentation that gives an overview of IronPython's internals, and how IronPython can be extended / modified. I'm looking for more details than are available in books like

Re: [IronPython] clrtype: How to subclass ClrClass?

2010-02-18 Thread Shri Borde
Sorry, I have not, and unfortunately will not be able to get to it until next week. Please vote on http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26249 if you want to see it fixed in 2.6.1. Depending on the fix, it might have to wait until after 2.6.1 From: Lukas Cenovsky [mailto

[IronPython] Last change needed for working tempfiles

2010-02-18 Thread Martin (gzlist)
As mentioned in the release thread[1] tempfiles nearly work in IronPython 2.6.1 RC 1 now, they go away when explicitly closed or when the process ends, thanks to adding support[2] for the os.O_TEMPORARY flag. The current bug[3] is actually fixed as stated in IronPython 2.6.1 RC 1 as can be seen by

Re: [IronPython] Bug fixes in Ipy 2.6.1

2010-02-18 Thread Dino Viehland
This is interesting - there's a .NET exception object which is keeping a traceback frame alive which is keeping the just_numbers list alive. We should clear out the local .NET exception and the memory will then be eligible for collection. The good news is that as soon as this method is no long

Re: [IronPython] TraceBackFrame, f_globals, f_locals

2010-02-18 Thread Dino Viehland
This is a bug - f_locals / f_globals should be returning the module globals/locals but it's currently returning the locals for the actual compiled code. I've opened bug 26243: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26243 There's apparently 1 other sys.settrace bug that ne

[IronPython] Bug fixes in Ipy 2.6.1

2010-02-18 Thread Idan Zaltzberg
Hi, In Ipy 2.6 there some issues of memory leak when using generator methods. I downloaded Ipy 2.6.1 RC1 and indeed most of them were fixed. Still, one issue still remains the same but I'm not entirely sure this is a real bug: The following code shows that in some cases, some memory is not rele

[IronPython] TraceBackFrame, f_globals, f_locals

2010-02-18 Thread cold_fusion
Hello, I'm helping a coworker embed IronPython with some debugging functions into a C# app (following DevHawks example). The thing I don't understand is how the f_globals and f_locals fields work when executing the main script, neither contains the global/local names in the top most scope, but do