I am looking to change permissions on a file with the file mask stored in a configuration file. Since os.chmod() requires an octal number, I need to convert a string to an o
Have you just tried specifying base 8 to int:
int
num = int(your_str, 8)
Example:
s = '644' i = int(s, 8) # 420 decimal print i == 0644 # True