Changeset 64 for trunk/pxeconfig
- Timestamp:
- 01/16/06 10:04:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pxeconfig/hexls
r63 r64 42 42 regexp = re.compile('[' + string.hexdigits + ']{8}' ) 43 43 for f in os.listdir(path): 44 fullpath = os.path.join(path, f) 45 if os.path.islink(fullpath): 46 symlink_dest = os.readlink(fullpath) 47 else: 48 symlink_dest = None 49 44 50 if regexp.match(f) and len(f) == 8: 45 51 digit1 = string.atoi(f[:2], 16) … … 55 61 56 62 if hostname: 57 print'%s => %s => %s' % (f, ipaddr, hostname[0])63 output = '%s => %s => %s' % (f, ipaddr, hostname[0]) 58 64 else: 59 print '%s => %s' % (f, ipaddr) 65 output = '%s => %s' % (f, ipaddr) 66 67 if symlink_dest: 68 output = '%s -> %s' % (output, symlink_dest) 69 70 print output 60 71 else: 61 72 if f[0] != '.':
Note: See TracChangeset
for help on using the changeset viewer.