Python vs VB

Alex Martelli aleax at aleax.it
Mon May 19 02:51:17 EDT 2003


vivek kumar wrote:
   ...
> Like an app is running on windows (say Messanger). It has an OK button.
> Now what You have to do is from your Python program you have to call the
> click function of that OK button widget.
> 
> For this he also gave me a hint that for this U have to first get the
> handle for that particular widget and he used some windows API for that.
> But as I was not a good student in VC++ also, so I don't know what API can
> be used for that. :-(

You use EXACTLY the same Windows API for this task from either Basic or
Python.  It makes no difference which language you're calling the
appropriate API from.  Thus, it's a silly way to compare two languages.

BTW: to call Windows API's from Python you need Hammond's win32all
extensions (the standard Python distribution for Windows does not
include them; you can either get the ActiveState distribution, or get
the standard distribution, get the win32all extensions separately,
and install the latter on top of the former).


Alex





More information about the Python-list mailing list