[IronPython] About Python TextTestRunner

2008-12-04 Thread Deepali Abhyankar
Hi I used following code to write result on different media. unittest.TextTestRunner(verbosity=2).run(suite) : Writes result to StdOutput unittest.TextTestRunner(file,verbosity=2).run(suite) : Writes result to file But what should I do to write test result on file as well as StdOutput, on singl

Re: [IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread Jeff Slutter
I have found another way that better suits what I'm trying to do (and control). In a nutshell, I just add the function to the builtins. Here is the code: // some member function, etc. delegate int DoDelegate(); private int DoFunc() { return 10; } //... in the IronPython initialization, after t

Re: [IronPython] SilverShell 0.6 Released

2008-12-04 Thread Dan Eloff
On Thu, Dec 4, 2008 at 10:26 PM, Ph. T <[EMAIL PROTECTED]> wrote: > . I was disappointed to find on code.google > something that could be holding off on submitting source code > to some time in the indefinite future . gmail put this in the spam bucket . > . dll's and other microsoft magic should be

Re: [IronPython] SilverShell 0.6 Released

2008-12-04 Thread Ph . T
. I was disappointed to find on code.google something that could be holding off on submitting source code to some time in the indefinite future . gmail put this in the spam bucket . . dll's and other microsoft magic should be confined to vmware or some other virtual mach . On Wed, Dec 3, 2008 at 7

[IronPython] NWSGI 0.7 released

2008-12-04 Thread Jeff Hardy
NWSGI 0.7 is now available. This version adds support for ASP.NET sessions, fixes Unicode handling, and adds support for wildcard mappings. It is available at http://www.codeplex.com/NWSGI/Release/ProjectReleases.aspx?ReleaseId=20189. What is NWSGI? NWSGI is an ASP.NET HttpHandler that implements

Re: [IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread Dino Viehland
You can just import static functions instead. Something like: public static class ScriptHelpers { public static object AddNumbers(params object[] args) { return 42; } } Add the reference and then: from ScriptHelpers import * If you really need to construct an in

Re: [IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread Jeff Slutter
Actually this doesn't exactly work. If I want the command to be able to return a value, I can't go with the constructor route: res = AddNumbers( 3, 5 ); you want res equal to "8", but really it is an instance of my AddNumbers class. I don't want the script writers to be able to save this class in

Re: [IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread Jeff Slutter
Ok, now I feel a little stupid. Thanks :) I think it would be wise to drop the "params object[] args" and go with just actually specifying the parameters to the constructor so I can take advantage of type checking, etc. from Python. In the constructor I'll have to save the instance of the class c

Re: [IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread Dino Viehland
Do you mean you'd call it like "AddNumbers().Do(3, 4)"? This is really easy. Make AddNumbers public, then do: import clr clr.AddReference('MyAssembly') import AddNumbers AddNumbers().Do(3, 4) If you really want to do AddNumbers(3, 4) then you'd just write it as: public class AddNumbers { p

Re: [IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread James Matthews
You can just create the function name and do nothing with it. In Cpython i would use meta classes but idk if they are in IronPython On Thu, Dec 4, 2008 at 11:13 PM, Jeff Slutter <[EMAIL PROTECTED]>wrote: > I'm writing an application that I want to provide runtime scripting via > IronPython for. T

[IronPython] Calling functions in IronPython that don't really exist

2008-12-04 Thread Jeff Slutter
I'm writing an application that I want to provide runtime scripting via IronPython for. This application loads "plug-ins" from assemblies to add functionality. Each plug-in is a class with, for the sake of simplicity, a "Do" function. What I'm trying to figure out is that if I have a class like:

[IronPython] Don't let the IronPython IRC channel die

2008-12-04 Thread Sylvain Hellegouarch
Hi folks, There's been a IRC channel about IronPython for some time now but it's usually really quiet. I've seen friendly people and interesting discussions but too sparse to make them a lively channel. Maybe you're not aware of that channel but everyone is welcome. I think it'd be quite imp

Re: [IronPython] SilverShell 0.6 Released

2008-12-04 Thread Michael Foord
Dan Eloff wrote: A blatant plug for my own software here, but I just uploaded SilverShell 0.6.0: http://code.google.com/p/silvershell/ New in this release is the ability to run on the desktop with WPF, execution of code in background threads, and a scratchpad canvas for playing with UI controls.

Re: [IronPython] Parsing scripts

2008-12-04 Thread Orestis Markou
I've written PySmell, but it does static analysis rather than dynamic. That means that it won't handle code that lives in dlls, but it will handle any scripts of your own. I'll add support for dynamic analysis soon, though - it's easy to do. Have a look at http://pypi.python.org/pypi/pysmell