#================================================================
#================================================================
# C-WaveformGenerator
# FileOperation
# Common function file
#                                                CONTEC Co., Ltd.
#================================================================
#================================================================

#========================================
# Function name    isnum
# Parameter        str     String
# Parameter        base    Base
# Details          Function to checks if a string can be converted to a number
# Return value     True: Can be converted
#                  False: Can not be converted
#========================================
def isnum(str, base):
    try:
        if 16 == base:
            int(str, 16)
        else:
            int(str)
    except:
        return False
    return True
