Example #1
0
File: main.py Project: PRIHLOP/msh
 def run(self):
     """
     The main routine
     """
     m = msh(os.path.join(sys.path[0], 'config.cfg'))
     while True:
         m.check_for_new_commands()
         time.sleep(m.get_param_int('Main', 'INTERVAL_TO_CHECK_IN_SEC'))
Example #2
0
 def run(self):
     """
     The main routine
     """
     m = msh(os.path.join(sys.path[0], 'config.cfg'))
     while True:
         m.check_for_new_commands()
         time.sleep(m.get_param_int('Main', 'INTERVAL_TO_CHECK_IN_SEC'))
Example #3
0
File: main.py Project: PRIHLOP/msh
    def adduser(self):
        """
        Simple prompt to add new users
        """
        m = msh(os.path.join(sys.path[0], 'config.cfg'))

        username = raw_input('Enter user name: ')
        pw1 = getpass.getpass()
        pw2 = getpass.getpass("Confirm password: ")

        if pw1 == pw2:
            m.add_new_user(username, pw1)
            print 'User was succesfully added.'
        else:
            print 'Error: you provided different passwords'
Example #4
0
    def adduser(self):
        """
        Simple prompt to add new users
        """
        m = msh(os.path.join(sys.path[0], 'config.cfg'))

        username = raw_input('Enter user name: ')
        pw1 = getpass.getpass()
        pw2 = getpass.getpass("Confirm password: ")

        if pw1 == pw2:
            m.add_new_user(username, pw1)
            print 'User was succesfully added.'
        else:
            print 'Error: you provided different passwords'
Example #5
0
File: main.py Project: PRIHLOP/msh
 def singlerun(self):
     m = msh(os.path.join(sys.path[0], 'config.cfg'))
     m.check_for_new_commands()
Example #6
0
 def singlerun(self):
     m = msh(os.path.join(sys.path[0], 'config.cfg'))
     m.check_for_new_commands()