title: Python - Calling to a function within a method from another class
body: <p>I'm using Python inside of Autodesk Maya but this should apply anywhere.</p>
  
  <p>I have a class called <code>bRigUI</code> and it inherits from another class called <code>wingUtils</code> inside of the file <code>wingUtilities.py</code></p>
  
  <p>I can get to the <code>self.gPrefix</code> / etc. names by using inheritance. But I don't know how to get to the functions inside of the function that's inside of the class such as <code>def cName(txt):</code></p>
  
  <p>Here is the <code>wingUtilities</code> script:</p>
  
  <pre><code>import maya.cmds as cmds
  
  class wingUtils():
      def __init__(self):
          pass
      def wingUtil(self, *args):
          self.gPrefix = cmds.textField(self.prefixField, q = True, text = True)
          self.lPrefix = cmds.textField(self.leftPrefixField, q = True, text = True)
          self.rPrefix = cmds.textField(self.rightPrefixField, q = True, text = True)
  
          def cName(txt):
              n = self.gPrefix + (txt)
          def lName(txt):
              n = self.gPrefix + self.lPrefix + (txt)
          def rName(txt):
              n = self.gPrefix + self.rPrefix + (txt)
  
  w = wingUtils()
  </code></pre>
  
  <p>And here is a <em>VERY</em> dumbed down UI script that is trying to call it (and is also the class with the inheritance) - this script wont work, it's just a shell to show you what I'm doing without all the clutter.</p>
  
  <pre><code>import maya.cmds as cmds
  import jtWingRigAutomation.wingUtilities as wingUtilities
  
  reload(wingUtilities)
  
  class bRigUI(wingUtilities.wingUtils):
      def __init__(self):
  
          bRigUI = 'bRigUI'
  
          if cmds.window(bRigUI, exists = True):
              cmds.deleteUI(bRigUI)
  
              bRigUI = cmds.window('bRigUI', title = 'JT Wing Rig Automation')
          form = cmds.formLayout()
          tabs = cmds.tabLayout(innerMarginWidth = 5, innerMarginHeight = 5)
          cmds.formLayout(form, e = True, attachForm=((tabs, 'top', 0), (tabs, 'left', 0), (tabs, 'bottom', 0), (tabs, 'right', 0)))
  
          tab2 = cmds.rowColumnLayout('Wing Setup', parent = tabs)
          cmds.text(self.naming(), parent = tab2)
  
          cmds.showWindow(bRigUI)
          cmds.window(bRigUI, e = True, w = 250, h = 500)
  
  b = bRigUI()
  </code></pre>
  
  <p>What do I enter in the UI script to call to the function <code>cName</code> within the method within the <code>wingUtils</code> class?</p>