replication scratch script bash --> python