hmmm, not sure if it is exposed to python yet. You can run the 'sweepMeshMenuCallback;' command through python though like this.
import maya.mel as mel
mel.eval('sweepMeshMenuCallback;')
as long as your curve is selected that should work.
then if you want to change the profile you will have to get access to the sweepMeshCreator and change it's attribute sweepProfileType
It would look something like this
mel.eval('setAttr "sweepMeshCreator1.sweepProfileType" 2;')
# the integer at the end references what profile you want to select in the menu
# 0 - Poly, 1 - Rectangle, 2 - Line, 3 - Arc, 4 - Wave, 5 - Custom
# also the default name for thet sweepMeshCreators is in typical Maya fashion with them being called sweepMeshCreator1 , sweepMeshCreator2 . . . and so on
If you want to get a full list of the attributes you can look them up by printing the list of them using listAttr in mel like this:
listAttr sweepMeshCreator1;
//which will return a long list of things you can access.