Extended Python script.