Last change
on this file since 8499 was 5334, checked in by rick, 18 years ago |
3 total different ways of making the ip -> nodename link
|
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:mime-type
set to
text/plain
|
File size:
624 bytes
|
Line | |
---|
1 | #!/usr/bin/env python
|
---|
2 | import os
|
---|
3 | import re
|
---|
4 |
|
---|
5 | def xor(a,b):
|
---|
6 | return (not b and a) or (not a and b) or False
|
---|
7 |
|
---|
8 | ipre = re.compile('^IP')
|
---|
9 | masterre = re.compile('master_ip')
|
---|
10 | ipnumber = re.compile('([0-9]{1,3}(\.[0-9]{1,3}){3})')
|
---|
11 |
|
---|
12 | for file in os.listdir('.'):
|
---|
13 | if file[0:5] == "proxy" or file[0:5] == "CNode":
|
---|
14 | conf = open( file + '/wleiden.conf', 'r')
|
---|
15 | for line in conf.readlines():
|
---|
16 | a = ipre.search(line)
|
---|
17 | b = masterre.search(line)
|
---|
18 | if (xor(a,b)):
|
---|
19 | result = ipnumber.search(line).groups()[0]
|
---|
20 | print '%s|%s' % ( result,file)
|
---|
21 | conf.close()
|
---|
22 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.