So you're controlling a Windows downloader running in Wine. Is this downloader graphical? Is this icon in a window or what?
Assuming yes to both:
- If your Python application is running natively in *nix (not Wine), the only sure way is to take a screenshot around the cursor and use Optical Character Recognition to recognize the numbers in the image :-). This is because under Wine, not every Windows window is an X11 window.
- If you are running your application on a Windows version of Python installed in Wine, you're in luck. Tooltips are just windows - you should be able to iterate over all windows in the downloader, and get the contained text.