By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

how should i use this function?

P: n/a
http://aspn.activestate.com/ASPN/doc...Text_meth.html

GetSelText()

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

Thanks!
Jun 27 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Jun 4, 8:14 pm, Gandalf <goldn...@gmail.comwrote:
I tried to import win32ui.PyCRichEditCtrl, But the shell told me
their's no such module.
There isn't, as it is a class. win32ui is a module. If you cannot
import that, you don't have pywin32 installed. Go get it from
Sourceforge.
Jun 27 '08 #2

P: n/a
On Jun 4, 8:21 pm, sturlamolden <sturlamol...@yahoo.nowrote:
On Jun 4, 8:14 pm, Gandalf <goldn...@gmail.comwrote:
I tried to import win32ui.PyCRichEditCtrl, But the shell told me
their's no such module.

There isn't, as it is a class. win32ui is a module. If you cannot
import that, you don't have pywin32 installed. Go get it from
Sourceforge.
But I pywin32 use it all the time i have pywinauto
Jun 27 '08 #3

P: n/a
In article
<f8**********************************@a1g2000hsb.g ooglegroups.com>,
Gandalf <go******@gmail.comwrote:
On Jun 4, 8:21 pm, sturlamolden <sturlamol...@yahoo.nowrote:
On Jun 4, 8:14 pm, Gandalf <goldn...@gmail.comwrote:
I tried to import win32ui.PyCRichEditCtrl, But the shell told me
their's no such module.
There isn't, as it is a class. win32ui is a module. If you cannot
import that, you don't have pywin32 installed. Go get it from
Sourceforge.

But I pywin32 use it all the time i have pywinauto
And, as I seem to recall someone saying once, win32ui.PyCRichEditCtrl
is not a module so you can't import it. You can say

from win32ui import PyCRichEditCtrl

Or you can say

import win32ui

and then reference win32ui.PyCRichEditCtrl .

--
David C. Ullrich
Jun 27 '08 #4

P: n/a
On Jun 4, 11:46 pm, "David C. Ullrich" <dullr...@sprynet.comwrote:
In article
<f87fa9ad-f048-4728-a9a9-8845fe376...@a1g2000hsb.googlegroups.com>,

Gandalf <goldn...@gmail.comwrote:
On Jun 4, 8:21 pm, sturlamolden <sturlamol...@yahoo.nowrote:
On Jun 4, 8:14 pm, Gandalf <goldn...@gmail.comwrote:
I tried to import win32ui.PyCRichEditCtrl, But the shell told me
their's no such module.
There isn't, as it is a class. win32ui is a module. If you cannot
import that, you don't have pywin32 installed. Go get it from
Sourceforge.
But I pywin32 use it all the time i have pywinauto

And, as I seem to recall someone saying once, win32ui.PyCRichEditCtrl
is not a module so you can't import it. You can say

from win32ui import PyCRichEditCtrl

Or you can say

import win32ui

and then reference win32ui.PyCRichEditCtrl .

--
David C. Ullrich
OK you right, but it still doesn't work. PyCRichEditCtrl is probably
not the correct object
Jun 27 '08 #5

P: n/a
On Jun 4, 6:58 pm, Gandalf <goldn...@gmail.comwrote:
>
But I pywin32 use it all the time i havepywinauto
As the author of pywinauto - I can safely say that just because you
have and use pywinauto does NOT mean you have pywin32.
pywin32 is not needed for pywinauto. (it uses ctypes to access what it
needs).

You might find that there are more people who can help you at
http://clearspace.openqa.org/communi...ywinauto_users

(though I do not give the best support in the world - so messages have
sat there for a while unanswered!)

Thanks
Mark
Jun 27 '08 #6

P: n/a
On Jun 5, 4:14 am, Gandalf <goldn...@gmail.comwrote:
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/e...pythonwin.html
Jun 27 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.