def oct2int(number):
    """Convert 3 numbers to be able to chmod.

    Given a (string or int) representation of a file mode, such as "777"
    -- you have to realize that is actually an octal number --,
    returns the corresponding integer to be able to chmod.
    """
    return eval("0o" + str(number))