> According to the format strings, 'ret' is a number. If that's the case, > it's not a string, so ret != "" will always be true. > > Why are you wrapping the command string literals in (...)? That's not > necessary. > > You're doing the same thing with each of the command strings, so why > not put them into a list and then iterate over them? It'll save a lot > of duplication. > > --
Thanks for pointing the ret !="" error . It should be ret!=0 , yes let me put into the string and try to iterate. -- https://mail.python.org/mailman/listinfo/python-list