Week 03 2020

  • Python: How to get a class name from a type
class A:
	pass

a = A()
print(a.__class__.__name__)

# or
print(type(a).__name__)
  • Hugo: Build with Drafts hugo -D serve

  • Python: List sub directories

tool_codegen_dir: Path = Path(__file__)
print([x.name for x in tool_codegen_dir.iterdir() if x.is_dir()])