Mechanical means are possible and should be the first trial on unpainted glass. Use a flexible, sharp blade to scrape at the paint. Often there was enough dirt on the glass that the paint will pop off easily. Where you have painted glass – that is glass paint rather than house paint - you need to test how secure the glass paint is. Find an area where any loss of paint will not be noticed and try the mechanical method. If the glass paint does come off, you need to go to a glass conservator who will have a range of chemicals suitable.
The most common chemical removal method is to use an alkaline paint remover. Glass is also an alkaline material, so the paint remover does not affect the glass. Any commercial paint and varnish remover can be used.
Put on a fume mask and rubber gloves. Apply the chemical with a brush and let it work for a while. Agitate the chemical after this pause to see if the paint has been removed. If not, add some more chemical and wait. When the paint has been loosened, rinse with lots of water.
This should not be used on areas with glass paint due to the risk of removing the glass paint.