#!/usr/bin/env python import os import string import sys from fileattrib import fileattrib tuple = fileattrib('fnpc22:/machinery/FileName') #tuple = fileattrib('hugh@fnpc22:') #tuple = fileattrib('lucyna@katharina:../utilities/tester1.py') #tuple = fileattrib('myself@fnpc22:tester.py') #tuple = fileattrib('tester1.py') #tuple = fileattrib() #tuple = fileattrib('myself:fnpc22:$HOME/tester.py') # this one is not handled that greatly: #tuple = fileattrib('myself.py tmp/tester.py') #tuple = fileattrib('myself@fnpc22:$HOME/tester.py') print "return flag: %s " % tuple[0] for names in tuple[1].keys(): if type(tuple[1][names]) == type(''): print '\t' + names + ":\t" + tuple[1][names] else: print '\t' + names + ":\t" + `tuple[1][names]` # this works also: #status,fdict = fileattrib('tester1.py') #print "return flag: %s " % status #for names in fdict.keys(): # print '\t' + names + ':\t' + fdict[names]