#global
note = 0
...
def getResource():
global note
...
if not pynotify.init("g2u"):
print(">> Failed to load notification.")
note = pynotify.Notification("g2u", "Downloading ...")
note.set_urgency(pynotify.URGENCY_NORMAL)
note.set_timeout(pynotify.EXPIRES_NEVER)
note.add_action("clicked", "Cancel", callbackGetCancel)
urllib.urlretrieve(url, local, reporthook=callbackGetProgress)