Reputation: 3243
Im new to python and zope. In the ZMI I have created a new python script with the following code:
the_message = 'hello there human'
print the_message
I am unable to save the file as it gives the error 'Prints, but never reads 'printed' variable'.
If I use return the_message
then it saves and displays fine.
Does anyone know what is going wrong here? is there something I need to add to my script that im missing?
Upvotes: 1
Views: 765
Reputation: 1123440
You need to explicitly return printed
:
the_message = 'hello there human'
print the_message
return printed
The printed
variable is not implicitly read. See Print Statement Support in the Basic Scripting chapter of the Zope 2 book.
Upvotes: 2