[K12OSN] TeacherTool
Huck
dhuckaby at paasda.org
Fri Oct 15 21:59:22 UTC 2004
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?
--Huck
<snip>
def populateList(self):
" Populates the list of user with unique user at machines
combinations "
self.listBox.deleteAll()
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()
fd.close()
self.listBox.deleteAll()
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.append(user+"@"+machine)
userList = self.gu.uniqueItems(userList)
userList.sort()
for item in userList:
self.listBox.add(item)
</snip>
>>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 at redhat.com
>>https://www.redhat.com/mailman/listinfo/k12osn
>>For more info see <http://www.k12os.org>
>>
>>
>>
>>
More information about the K12OSN
mailing list