X gurus?

Ken Seehof kens at sightreader.com
Wed Mar 1 10:42:29 CET 2000

Actually, if you can't do something in python, that is not
a reason not to use python for your project.

What you do is write C extensions to give python the
ability to do things that previously could only be done
in C.  As a matter of fact, everything python does, it
does because people have written extensions in C
(I'm including standard modules and built-ins).

I'm not familiar with X Windows, but most likely, the
answer to your question will be arriving here shortly.
I'm betting the answer is yes.

- Ken Seehof

Mike Sabin wrote:

> I am beginning a small project which I am afraid may
> have to end up being written in C (I say afraid,
> because I will have to LEARN C first, if this is the
> case).  I am programming for the X Windows environment
> on Linux, and need to accomplish the following two
> things:
> 1. At a certain time, I need to get the x-y coordinates
> of my mouse pointer, no matter where my pointer is at
> the time (it could be over the window for some other
> application, but I want a function call to return
> the coordinates to my application)
> 2. At a certain time, I need to artificially generate
> a button 1 mouse click, whereever the mouse pointer is
> currently located (e.g. over another application's
> window).  My program must do this, without me actually
> having to click on the mouse or hit any key.
> Can it be done in python?  I actually don't have much
> hope that it can, but I am often surprised what some
> of you people will come up with around here....
> Mike Sabin

More information about the Python-list mailing list