示例#1
0
 def __init__(self, argv, base=None):
     """
     Main method
     @param argv: values of inline arguments
     """
     
     if (base == None):
         path = __file__.split('/')
         base = '/'.join(path[:-1]) + '/'
     
     ConsoleUI.__init__(self, 'swaml', base)
     
     self.config = Configuration()        
     
     for arg in argv:
         if arg == "-h" or arg == "--help":
             self.usage()
         elif arg == "-v" or arg == "--version":
             self.version()
             
     self.config.setAgent('http://swaml.berlios.de/doap#swaml') #TODO: how __init__.__agent__?
     self.parseArgs(argv)
     if (base == None):
         self.list = MailingList(self.config)
     else:
         self.list = MailingList(self.config, base)
     messages = self.list.publish()
     print str(messages), 'messages procesed'
示例#2
0
    def __init__(self, argv, base=None):
        """
        Main method
        @param argv: values of inline arguments
        """

        if (base == None):
            path = __file__.split('/')
            base = '/'.join(path[:-1]) + '/'

        ConsoleUI.__init__(self, 'swaml', base)

        self.config = Configuration()

        for arg in argv:
            if arg == "-h" or arg == "--help":
                self.usage()
            elif arg == "-v" or arg == "--version":
                self.version()

        self.config.setAgent('http://swaml.berlios.de/doap#swaml'
                             )  #TODO: how __init__.__agent__?
        self.parseArgs(argv)
        if (base == None):
            self.list = MailingList(self.config)
        else:
            self.list = MailingList(self.config, base)
        messages = self.list.publish()
        print str(messages), 'messages procesed'
示例#3
0
class SWAML(ConsoleUI):
    """
    Main class of SWAML project
    
    @author: Sergio Fdez
    @license: GPL
    """

    def parseArgs(self, argv):
        """
        Getting params of default input
        
        @param argv: arguments values array
        """
        
        if not self.config.parse(argv):
            self.usage()
            
        #self.config.show()
        
    def version(self):
        """
        Print program version
        """
        
        print "SWAML 0.1.0", #TODO: __init__.__version__
        sys.exit()

    def __init__(self, argv, base=None):
        """
        Main method
        @param argv: values of inline arguments
        """
        
        if (base == None):
            path = __file__.split('/')
            base = '/'.join(path[:-1]) + '/'
        
        ConsoleUI.__init__(self, 'swaml', base)
        
        self.config = Configuration()        
        
        for arg in argv:
            if arg == "-h" or arg == "--help":
                self.usage()
            elif arg == "-v" or arg == "--version":
                self.version()
                
        self.config.setAgent('http://swaml.berlios.de/doap#swaml') #TODO: how __init__.__agent__?
        self.parseArgs(argv)
        if (base == None):
            self.list = MailingList(self.config)
        else:
            self.list = MailingList(self.config, base)
        messages = self.list.publish()
        print str(messages), 'messages procesed'
示例#4
0
class SWAML(ConsoleUI):
    """
    Main class of SWAML project
    
    @author: Sergio Fdez
    @license: GPL
    """
    def parseArgs(self, argv):
        """
        Getting params of default input
        
        @param argv: arguments values array
        """

        if not self.config.parse(argv):
            self.usage()

        #self.config.show()

    def version(self):
        """
        Print program version
        """

        print "SWAML 0.1.0",  #TODO: __init__.__version__
        sys.exit()

    def __init__(self, argv, base=None):
        """
        Main method
        @param argv: values of inline arguments
        """

        if (base == None):
            path = __file__.split('/')
            base = '/'.join(path[:-1]) + '/'

        ConsoleUI.__init__(self, 'swaml', base)

        self.config = Configuration()

        for arg in argv:
            if arg == "-h" or arg == "--help":
                self.usage()
            elif arg == "-v" or arg == "--version":
                self.version()

        self.config.setAgent('http://swaml.berlios.de/doap#swaml'
                             )  #TODO: how __init__.__agent__?
        self.parseArgs(argv)
        if (base == None):
            self.list = MailingList(self.config)
        else:
            self.list = MailingList(self.config, base)
        messages = self.list.publish()
        print str(messages), 'messages procesed'