Python script now working