test args

This commit is contained in:
admin 2026-01-28 09:55:16 -08:00
parent 49d384bfd8
commit 9a71e013fc

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
''' This is a template for creating new python scripts, ''' This is a program to get a url from google ee api based on supplied region'''
complete with argument processing and simple I/O '''
import logging import logging
import stat import stat
@ -29,7 +28,7 @@ class Timerlog:
if duration_only: if duration_only:
return "Timer [{}] duration [{:.5f}]".format( return "Timer [{}] duration [{:.5f}]".format(
self.name, self.time_end - self.time_start) self.name, self.time_end - self.time_start)
return "Timer [{}] begin [{:.5f}] end [{:.5f}] duration [{:.5f}]".format( return "Timer [{}] begin [{:.5f}] end [{:.5f}] duration [{:.9f}]".format(
self.name, self.time_start, self.time_end, self.time_end - self.time_start) self.name, self.time_start, self.time_end, self.time_end - self.time_start)
program_name = 'get_ee_from_region.py' program_name = 'get_ee_from_region.py'
@ -96,3 +95,10 @@ if args.logging or args.verbose:
if args.verbose: if args.verbose:
logging.debug('logging to stderr requested') logging.debug('logging to stderr requested')
t = Timerlog("atomic test").start()
logging.debug(t.end().report())
logging.debug("Country is [{}]".format(args.country))
logging.debug("Region is [{}]".format(args.region))