How would I limit mouse movement in python? For example I have a 480x480 grid where each block is 30. If I click on a block I would like to only be able to click in an area of one block around the block that I placed.

Its going to be platform dependant, for windows you're going to have to use the win32 library and for Linux(and some unix flavors) you're going to have to use xlib, unfortunatly xlib for python is horribly documented.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.