ok, understood:
allzero = 1
while allzero > 0:
newraster = Con(rasterX > 0, rasterX -1, rasterX)
maxcellvalue = getRasterProperties_management(newraster, "MAXIMUM")
if maxcellvalue <= 0:
allzero = 0
sorry for the bad syntax and the poorness of the code, keep it as an advice.
should do what you need with the proper adjustments 🙂
ciao
AC