On Nov 13, 2006, at 1:41 PM, Don Dwiggins wrote:
> Another goodie: a neat trick Robin mentioned on the wx list, is to add
> the following to your App.OnInit method:
>> if len(sys.argv) > 1 and sys.argv[1] == '-s':
>> from wx import py
>> #shell = py.shell.ShellFrame(
>> shell = py.crust.CrustFrame(
>> self.frame, locals=dict(wx=wx, frame=self.frame,
>> app=self))
>> shell.Show()
>> self.frame.Raise()
> This will bring up an instance of PyCrust alongside your app, with
> "app"
> defined. You can then examine the contents of the app (start with
> "f =
> app.frame"), send methods to various objects, etc.
Of course, from Dabo you can bring up the Command Window (yeah,
doesn't sound as cute as 'PyCrust', but it's essentially the same
thing) by pressing Ctrl-D (Cmd-D on the Mac) when using the standard
menu. It will default to 'self' referring to the topmost window when
it was invoked, and 'self.Application' is always available.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users