]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/wx/tools/genaxmodule.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / wx / tools / genaxmodule.py
... / ...
CommitLineData
1"""
2
3
4When this script is run it will create a .py module (output to the
5current directory) containing a class derived from
6wx.activex.ActiveXWindow for the progID or CLSID given on the command
7line. By default the class name will be used as the module name as
8well, but this is just because I am lazy, not trying to define a
9standard or anything. Feel free to rename the module, I do.
10
11Usage:
12
13 python genax.py CLSID|progID className
14
15"""
16
17import wx
18import wx.activex
19import sys
20
21
22def main(args):
23 if len(args) < 3:
24 print __doc__
25 sys.exit(1)
26
27 # unfortunatly we need to make an app, frame and an instance of
28 # the ActiceX control in order to get the TypeInfo about it...
29 app = wx.PySimpleApp()
30 f = wx.Frame(None, -1, "")
31 clsid = wx.activex.CLSID(args[1])
32 axw = wx.activex.ActiveXWindow(f, clsid)
33
34 wx.activex.GernerateAXModule(axw, args[2], '.', verbose=True)
35
36 # Cleanup
37 f.Close()
38 app.MainLoop()
39
40
41if __name__ == "__main__":
42 main(sys.argv)
43