pythonizer
pythonizer copied to clipboard
Octal numbers need to get 0o in python output
In python 2.7, 0123 was an octal constant, same as in perl, but in Python 3+ you have to put 0o in front of your octal numbers, so this case would be 0o123.
Fix in perlscan.pm:
$cut=length($val);
if($cut > 1 && substr($ValPy[$tno], 0, 1) eq '0') { # issue 22
$ValPy[$tno] = "0o".substr($ValPy[$tno], 1); # issue 22
} # issue 22
}elsif( $s=~/\w/ ){
Fixed in https://github.com/snoopyjc/pythonizer