#
#
#
import time
import re

#
class Toolbox:

  #
  @staticmethod
  def getTimestampStr():
    try:
      timestr = time.strftime('%Y-%m-%d_%H%M%S', time.localtime(time.time()))
    except:
      timestr = '000'
    return timestr

  #
  @staticmethod
  def parseFilenameIncExt(fqfilepath):
    print("filename=={}".format(fqfilepath))
    results = re.search(r'([\w_-]+)([.\w_-]*)$', fqfilepath)
    if len(results.group(1)) != 0:
      filename = results.group(1)
    if len(results.group(2)) != 0:
      ext = results.group(2)
    return (filename, ext)
