Get the range from a range gen or extend:
pdgattrib("range", 0) #first frame pdgattrib("range", 1) #last frame