Change texture in game

How can i change a texture in game, say in my texture tab i have.
One texture on for flashlight off
Second texture for flashlight on, but its the tick is off because its turned off.
How do i switch them in python ? if anybody can help it would be nice.

You can literally swap the textures now using PYopenGL now but I would suggest using replace mesh instead.

For the love of me why did i not remember i can replace the mesh lol, i got scatter brain again.
Thanks BPR!