Exemplo n.º 1
0
def compose_tmp_suffix(suffix, frames_back=0):
    from libtbx.introspection import caller_location
    caller = caller_location(frames_back=frames_back + 1)
    s = os.path.basename(caller.file_name)
    if (s.lower().endswith(".py")): s = s[:-3]
    s += "_" + str(caller.line_number)
    return "_" + s + suffix
Exemplo n.º 2
0
def compose_tmp_suffix(suffix, frames_back=0):
  from libtbx.introspection import caller_location
  caller = caller_location(frames_back=frames_back+1)
  s = os.path.basename(caller.file_name)
  if (s.lower().endswith(".py")): s = s[:-3]
  s += "_" + str(caller.line_number)
  return "_" + s + suffix