There is a little complication in the definition of the python interface. It lies in the fact that python does not include the signature of a method in its definition. In other words, you cannot define two functions with the same name and differents arguments (even different numbers of them) in python.
The solution is to define a single function in python for all java functions with the same name which checks the number of arguments given and their types to choose the right java function. This was done in the actual interface implementation, in file python/BookkeepingSvc.py of the Bookkeeping package. However, we will show here a pseudo interface where different functions may have the same name.
Listing 1.9 gives the full list of methods available in python with the type of the arguments and return type. Note that the given return type is the one that is returned in case of success. If the call fails, a string is returned containing the error message. Thus the returned type should always be checked to detect errors.
Sebastien Ponce 2004-03-12