Hi, Tom,
Von: Tom Unger
But I want to eliminate the need for each script to do that import by setting
up the scope with:
scriptScope.SetVariable(App, App);
This does not compile because App is a static class, not an object.
Maybe scriptScope.SetVariable(App,
I am using IronPython for scripting an application. To make writing scripts
easier I want to place several objects in the script name space so they can
be easily used. I got stuck with how to place a reference to a static
object, App, in the name space. This is probably a simple operation and
:16 AM
To: 'users@lists.ironpython.com'
Subject: [IronPython] How to place static class in script name space
I am using IronPython for scripting an application. To make writing scripts
easier I want to place several objects in the script name space so they can be
easily used. I got stuck
, June 13, 2011 1:22 PM
To: Discussion of IronPython
Subject: Re: [IronPython] How to place static class in script name space
We specifically allow from staticclass import * because we treat a static class
as if it were like a module. So you could simply run that line of code in the
scope