Assuming you're using a sync_block
as block type, your work function will look like this:
def work(self, input_items, output_items):
where input_items
is a 2D-array. First axis is the input ports (you might have only one) and second axis is the input items. So, if you just want to print the input items of the first input port in the terminal, you can do something like:
for i in range(len(input_items[0])):
print input_items[0][i]
Since you are producing the output items yourself within the work function, you can print them in the same manner after creating them.
Still, I think you try to solve something with this question that could be solved in another (better) way. Can you specify what you're trying to do with the information gathered by the printed input/output items?