Re: how should i use this function?

2008-06-04 Thread sturlamolden
On Jun 4, 8:14 pm, Gandalf [EMAIL PROTECTED] wrote:

 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.


--
http://mail.python.org/mailman/listinfo/python-list


Re: how should i use this function?

2008-06-04 Thread Gandalf
On Jun 4, 8:21 pm, sturlamolden [EMAIL PROTECTED] wrote:
 On Jun 4, 8:14 pm, Gandalf [EMAIL PROTECTED] wrote:

  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
--
http://mail.python.org/mailman/listinfo/python-list


Re: how should i use this function?

2008-06-04 Thread David C. Ullrich
In article 
[EMAIL PROTECTED],
 Gandalf [EMAIL PROTECTED] wrote:

 On Jun 4, 8:21 pm, sturlamolden [EMAIL PROTECTED] wrote:
  On Jun 4, 8:14 pm, Gandalf [EMAIL PROTECTED] wrote:
 
   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
--
http://mail.python.org/mailman/listinfo/python-list


Re: how should i use this function?

2008-06-04 Thread Gandalf
On Jun 4, 11:46 pm, David C. Ullrich [EMAIL PROTECTED] wrote:
 In article
 [EMAIL PROTECTED],

  Gandalf [EMAIL PROTECTED] wrote:
  On Jun 4, 8:21 pm, sturlamolden [EMAIL PROTECTED] wrote:
   On Jun 4, 8:14 pm, Gandalf [EMAIL PROTECTED] wrote:

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
--
http://mail.python.org/mailman/listinfo/python-list


Re: how should i use this function?

2008-06-04 Thread Mark
On Jun 4, 6:58 pm, Gandalf [EMAIL PROTECTED] wrote:

   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/community/pywinauto/pywinauto_users

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

Thanks
  Mark
--
http://mail.python.org/mailman/listinfo/python-list


Re: how should i use this function?

2008-06-04 Thread alex23
On Jun 5, 4:14 am, Gandalf [EMAIL PROTECTED] 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
--
http://mail.python.org/mailman/listinfo/python-list