Change the way python flags are detected