there must be a better way to do this
<p>This is an ugly, high maintenance factory.  I really just need a way to use the string to instantiate an object with a name that matches the string.  I think metaclass is the answer but I can't figure out how to apply it:</p>

<pre><code>from commands.shVersionCmd import shVersionCmd
from commands.shVRFCmd import shVRFCmd
def CommandFactory(commandnode):
    if commandnode.attrib['name'] == 'shVersionCmd': return shVersionCmd(commandnode)        
    if commandnode.attrib['name'] == 'shVRFCmd': return shVRFCmd(commandnode)
</code></pre>
