how should i use this function?
alex23
wuwei23 at gmail.com
Wed Jun 4 20:18:47 EDT 2008
On Jun 5, 4:14 am, Gandalf <goldn... at gmail.com> wrote:
> I tried to import win32ui.PyCRichEditCtrl, But the shell told me
> their's no such module.
>
> If anyone can show me an example it would be great
For starters, you're looking at the documentation for ActivePython 2.2
rather than 2.5.
Do you know about pythons introspective abilities? That you can find a
list of available methods & objects by doing 'dir(win32ui)' in the
interpreter?
Having said that, here's how to get a PyCRichEditCtrl object:
ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32ui
>>> rec = win32ui.CreateRichEditCtrl()
>>> type(rec)
<type 'PyCRichEditCtrl'>
It's worth noting that win32ui is basically just a wrapper around the
Microsoft Foundation Classes, so you'll need to look through the MFC
documentation rather than that of the wrapper.
This might help get you started: http://www.onlamp.com/pub/a/python/excerpts/chpt20/pythonwin.html
More information about the Python-list
mailing list