removed print statement in locator.calculate_sunrise_sunset(); fixed small errors in documentation

This commit is contained in:
dh1tw 2014-09-28 00:59:42 +02:00
parent 87a705c5c4
commit beb8862ebe
3 changed files with 8 additions and 3 deletions

View file

@ -57,7 +57,7 @@ First we need to instanciate a LookupLib object for Country-files.com database.
>>> my_lookuplib = LookupLib(lookuptype="countryfile")
Next, a Callinfo class needs to be instanciated. The lookuplib object will be injected on construction.
Next, a Callinfo object needs to be instanciated. The lookuplib object will be injected on construction.
.. code-block:: none

View file

@ -287,7 +287,12 @@ def calculate_sunrise_sunset(locator, calc_date=datetime.utcnow()):
>>> UTC = pytz.UTC
>>> myDate = datetime(year=2014, month=1, day=1, tzinfo=UTC)
>>> calculate_sunrise_sunset("JN48QM", myDate)
74.3136
{
'morning_dawn': datetime.datetime(2014, 1, 1, 6, 36, 51, 710524, tzinfo=<UTC>),
'sunset': datetime.datetime(2014, 1, 1, 16, 15, 23, 31016, tzinfo=<UTC>),
'evening_dawn': datetime.datetime(2014, 1, 1, 15, 38, 8, 355315, tzinfo=<UTC>),
'sunrise': datetime.datetime(2014, 1, 1, 7, 14, 6, 162063, tzinfo=<UTC>)
}
"""
morning_dawn = None
@ -349,6 +354,5 @@ def calculate_sunrise_sunset(locator, calc_date=datetime.utcnow()):
result['evening_dawn'] = evening_dawn.replace(tzinfo=UTC)
if sunset:
result['sunset'] = sunset.replace(tzinfo=UTC)
print result
return result

View file

@ -2,5 +2,6 @@ sphinxcontrib-napoleon>=0.2.7
requests>=2.2.1
pytz>=2014.2
pyephem>=3.7.5.3
redis>=2.10.2