Ejemplo n.º 1
0
 def handle(self, **options):
     '''
     In this example command, the values that come from the user input are
     added up and the result is printed in the screen.
     '''
     sum_of_numbers = 0
     from_number = int(options['sum'][0])
     to_number = int(options['sum'][1])
     for number in range(from_number, to_number + 1):
         sum_of_numbers = sum_of_numbers + int(number)
     text_file = open("from_%s_to_%s.txt" % (from_number, to_number), "w")
     text_file.write("%s" % sum_of_numbers)
     text_file.close()
     print (_('The sum of the numbers from %s to %s is: %s') % (
         from_number,
         to_number,
         sum_of_numbers
         )).encode('utf-8')
     print (_('This is a stub for the Change Detection Command.')).encode('utf-8')
Ejemplo n.º 2
0
def madmex_copyright():
    '''
    Copyright legend for the MADMex system.
    '''
    LOGGER.info("Printing out the copyright.")
    return _('MADMex 2009-%s') % date.today().year
Ejemplo n.º 3
0
def madmex_copyright():
    '''
    Copyright legend for the MADMex system.
    '''
    LOGGER.info("Printing out the copyright.")
    return _('MADMex 2009-%s') % date.today().year