Q:

How to get a list of supported gdal formats within python

Is there a way to get a list of installed gdal formats on a system with python? On the command line this can be done easily with:
gdalinfo --formats

...but can it be done in python?

A:

gdal.GetDriverCount() will provide the number of drivers that gdal has. Combined with a simple loop, it is possible to list all the drivers.
import gdal
driver_list = []
for i in range(gdal.GetDriverCount()):
    driver = gdal.GetDriver(i)
    driver_list.append(driver.GetDescription())

# list comprehension
driver_list = [gdal.GetDriver(i).GetDescription() for i in range(gdal.GetDriverCount())]

# to get name as string
gdal.GetDriver(i).ShortName

