consider print 'end' parameter for newline detection in api.printme