python script for input editing