How to GetClassName in Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bala

    How to GetClassName in Python

    Hi,
    I want to know how to getclassname of application from python..In python There is no method like GetClassName...
    Is there any other Method ...I kindly give some example in python..
    If anyone answer to the above problem....I will be very thankfull to you...

    Note:- Using Python Application, I want to Get the ClassName of any Application.
  • Hemanth P.S.

    #2
    Re: How to GetClassName in Python

    "bala" <blk@srasys.co. in> wrote in message news:<mailman.1 161.1069994459. 702.python-list@python.org >...[color=blue]
    > Hi,
    > I want to know how to getclassname of application from python..In
    > python There is no method like GetClassName...
    > Is there any other Method ...I kindly give some example in python..
    > If anyone answer to the above problem....I will be very
    > thankfull to you...
    >
    > Note:- Using Python Application, I want to Get the ClassName of any
    > Application.
    > --[/color]

    You can access it by the attribute __class__ of the object.
    --Hemanth

    Comment

    • Bengt Richter

      #3
      Re: How to GetClassName in Python

      On Fri, 28 Nov 2003 10:11:27 +0530, "bala" <blk@srasys.co. in> wrote:
      [color=blue]
      >
      >This is a multi-part message in MIME format.
      >
      >------=_NextPart_000_ 0009_01C3B597.F C516DF0
      >Content-Type: text/plain;
      > charset="iso-8859-1"
      >Content-Transfer-Encoding: quoted-printable
      >
      >Hi,
      > I want to know how to getclassname of application from python..In =
      >python There is no method like GetClassName...[/color]

      Presumably you want to access this win32 API:
      ----
      GetClassName
      The GetClassName function retrieves the name of the class to which the specified window belongs.

      int GetClassName(
      HWND hWnd, // handle of window
      LPTSTR lpClassName, // address of buffer for class name
      int nMaxCount // size of buffer, in characters
      );
      ----

      Most people here probably think of something different when you say "class" ;-)
      IOW, best to mention the windows connection, if it's not strictly a Python question.

      There are extension modules that will let you get at the win32 api. E.g.,
      see Mark Hammond's win32all at



      or Thomas Heller's ctypes module at



      [color=blue]
      >Is there any other Method ...I kindly give some example in python..
      > If anyone answer to the above problem....I will be very =
      >thankfull to you...
      >
      >Note:- Using Python Application, I want to Get the ClassName of any =
      >Application.
      >------=_NextPart_000_ 0009_01C3B597.F C516DF0
      >Content-Type: text/html;[/color]

      If you want to avoid annoying some people here (good strategy if you want help ;-)
      please try to avoid posting HTML to the newsgroup.

      Regards,
      Bengt Richter

      Comment

      Working...