Add python functionaliy

The user can define the function in python,
and the order() function works.