Does there exist a "Hello World" example for a Server Script

I have read the documentation and see theServer Script examples, but I want something that gives me immediate feedback so that I can see what is going on – like writing to ERPNext logs.

I tried that, but ended up with a mess: Have you ever seen, " NameError: name ‘print’ is not defined"?

Any suggestions?

So I discovered that Server Scripts are highly restricted in the functionality to which they have access, and raw Python commands are not among them.

Here’s the simplest Server Script I could come up with that meets my needs (more or less):

So: print is illegal, you must use frappe.msgprint instead.

Now, when I [Submit] a Returnable Batch this is what I see:

If there’s an allowed command that writes to the log file I would be glad to know about it.