If you have ogr2ogr modules modules, you can actually run the line given by John Mangual in Python.
This link have same helpful answers regarding to that. Using ogr2ogr to convert GML to shapefile in Python?Using ogr2ogr to convert GML to shapefile in Python?
Also you can run line with os module as in this link