How do I get an icon to appear in the label of my custom python node?
So far, the node icon only seams to appear in outliner (like datablocks).
Not very useful.

+The icon you show in the picture is preview button and it's hardcoded. not py

AFAIK you can alter, even in "real time" , the label with draw_label() and also the sockets texts. And of course, the color and size of the node. But not much more.

-

There might be an extreme workaround...

If you really need an image or something else on top of that, so much that you'd design a whole system just for that (instead of making great nodes and addons :D ), you can use OpenGl to draw something on top of the node, or header or whatever area

an example is this (note that the white rectangle could be on top of the self node! whatever the coords you need, you can work out the header area with precision)



and it's about
https://github.com/JacquesLucke/animation_nodes/tree/master/graphics