def isNumPosStrValue(value):
 return ((value and isinstance(value, basestring) and value.isdigit() and (int(value) > 0)) or (isinstance(value, int) and (value > 0)))

def isNumPosStrValue ( value ) : return ( ( value and isinstance ( value , basestring ) and value . isdigit ( ) and ( int ( value ) > 0 ) ) or ( isinstance ( value , int ) and ( value > 0 ) ) )
returns true if value is a string with a positive integer representation .