[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] TeacherTool

below is the function I believe that you are looking for to tweak in TeacherTool...
not sure where the tweak would go for 'numbers' or not..
looks like it's reading the whole thing as a string so should come out right to begin with?

def populateList(self):
" Populates the list of user with unique user machines combinations "
userList = []

#fd = os.popen("cat FakeData") # TESTING
fd = os.popen("netstat -t -e | grep x11 | sed -e 's/ \+/ /g' -e 's/:/ /g'") # REAL

       consoleOutput = fd.readlines()
       for line in consoleOutput:
           lineParts = string.split(line)
           if len(lineParts) >= 9:
                machine = lineParts[5]
                user = lineParts[8]
           else:  # RH9 bug?
                machine = lineParts[3]
                user = lineParts[6]
           if (user != "root" and not user[0] in string.digits):

       userList = self.gu.uniqueItems(userList)
       for item in userList:

If there is a quick fix for getting teachertool to pull usernames that
start with numbers( well, the whole thing is a number, actually) I would
really appreciate it.  For this year I do not see a convenient way to
change 600+ usernames to include an alpha at the beginning.  I mean I
know I could do it with a batch script physically, but it is the
relearning for the kids that I do not want to deal with

K12OSN mailing list
K12OSN redhat com
For more info see <http://www.k12os.org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]