Convert octal constants for Python compatibility