class ConfigInputs:
def inputs(self,**map):
if 'aa' in map:
print 'success'
print 'aa',map['aa']
if 'bb' in map:
print 'bb pass'
if 'cc' in map:
print 'cc pass'
if __name__ == "__main__":
print 'come here'
ap = ConfigInputs()
ap.inputs(aa='ccc',bb='xxx')
运行结果:
D:\Roboshop\roboshop_script\conn2_test\lib>python con_inputs.py
come here
success
aa ccc
bb pass
阅读(2229) | 评论(0) | 转发(0) |