hydroffice.ssp.atlases.woa09checker

A class that checks the presence of the WOA09 database. If not present, the class is able to download it.


In [1]:
import sys
try:
    input = raw_input
except NameError: #Python 3
    pass
from hydroffice.ssp.atlases.woa09checker import Woa09Checker

if Woa09Checker.is_present():
    print("WOA09 present")
    sys.exit(0)

In [2]:
ans = input("download it (y/n)?  ")


download it (y/n)?  y

In [3]:
ans.lower()
if ans == "y" or ans == "yes":
    print("downloading")
    chk = Woa09Checker()
    if chk.present:
        print("downloaded")
    else:
        print("issues")
else:
    print("exiting")


ERROR:hydroffice.ssp.atlases.woa09checker:during WOA09 download and unzip: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
downloading
issues