Пример #1
0
   def getClassName(self):
      className = ''

      while not className:
         className = self.Query.queryUser('Name of class (including \'Interface\' generates interface header)')
         if className and '.' in className:
            colory.printRed('Don\'t put a file extension, just the class name. Try again.')
            className = ''

      return className
Пример #2
0
   def getPathForFiles(self):
      dirPath = ''

      while not dirPath:
         dirPath = os.path.normpath(self.Query.queryUser('Full directory path to put files (leave blank to generate files in this directory)'))
         if dirPath and not os.path.exists(dirPath) or not os.path.isdir(dirPath):
            colory.printRed('Path doesn\'t exists or isn\'t a directory. Try again.')
            dirPath = ''

      return dirPath
Пример #3
0
 def verifyArgs(self, args):
    numArgs = len(args.split(' '))
    if numArgs > 0 and args:
       colory.printRed(str(args))
       colory.printRed('\nUsage:\npython generateModule.py')
       exit()