Print via user button

I wrote a code which calculates geometry and point masses inertia and prints it in the scripting command window. When I activate the code via a created user button nothing outputs. How do I print via a user button? Thank you

Answers