I've attached an updated Custom.py file with tons of new toys for you to tinker with!

Testing is encouraged and appreciated!
edit: download here
Here's what is there as of this version:
custom.foundCity(lCity, name, iPopulation, bForce, iCityCulture, iCulture, iUnitType, iNumUnits, iReligion, lBuildings)
This works the same as before, but I've managed to get rid of a bug and added a new functionality to it: If you set iUnitType to "-1" but have a value higher than "0" in iNumUnits, then the function will automatically detect what the conscripted unit type of that city would be, and creates this type of units instead. Note however that pre Gunpowder these units are actually melee units - and without the prerequisite strategic resources they will be Warriors...
custom.flipCity(tCityPlot, iNewOwner, bOnlyAI, iOldOwner, bAIOnly, bMinorsOnly, bConquest, bFlipUnits, iNumGarrison, bConscript)
This is a very useful new function that is covered in great detail in
this post.
custom.createGarrison(iCiv, bHuman, tCityPlot, iUnitType, iNumUnits, bConscript)
This is actually the function used in both
custom.foundCity and
custom.flipCity, but it works individually also. Its also possible to use it to spawn any unit type in any city, but with iUnitType set to the default value of "-1" it will automatically determine what units to create. (Also, the bConscript setting affects this.)
custom.setReligions(tCityPlot, lReligions, bErase, bMessage)
You feed the function a list of what religions will be present in the city located at tCityPlot (works also with the standard lCity lists). The bErase boolean can be used to also erase religions that are present in the city but not in the list. (An empty list ("[]") together with bErase = "True" would wipe all religions from the city.)
custom.spreadReligion(iReligion, TL, BR, bMessage)
This function gives all cities inside the specified area the religion specified by iReligion. Note that the TL and BR coordinates must be entered within brackets ([])!
The bMessage boolean for both above functions is used for enabling the religion spread announcement.
custom.eradicateReligion(iReligion, TL, BR)
This function can be used to wipe the iReligion religion clean out of an area!
custom.setBuildings(tCityPlot, lBuildings)
This function works just like it does in
custom.foundCity() but can be used separately to add any buildings to any city at any point.
custom.setGlobalBuilding(iCiv, iBuilding)
And finally, this function will give all cities belonging to iCiv the building specified in iBuilding. (Note that this is not a list of buildings, but only one integer value or variable.)
Happy mod-modding!

This is actually only the beginning, as the next batch of functions will make it possible to have dynamic starting Techs and world maps for any Civ...