def sunrise(self,when=None):  
  """ 
  return the time of sunrise as a datetime.time object 
  when is a datetime.datetime object. If none is given 
  a local time zone is assumed (including daylight saving 
  if present) 
  """  
  if when is None : when = datetime.now()  
  self.__preptime(when)  
  self.__calc()  
  return sun.__timefromdecimalday(self.sunrise_t,when)
 
  return the time of sunrise as a datetime.time object 
  when is a datetime.datetime object. If none is given 
  a local time zone is assumed (including daylight saving 
  if present) 
  
p_weather/sunrise.py