So in playing around with getattr in my code I discovered the following:
myVariable = foo.A.bar
works...but something like this:
B = "A"
myVariable = getattr(foo, B + ".bar")
returns an error that foo does not contain an attribute A.bar. Where am I going wrong? Thanks!