@atom: no a pynode is definitely not a single line affair
@key_eva:
basically a Node is a class that is derived from the class Blender.Node.Scripted
It should have a public interface that defined a function call() that is called for every pixel.
But, like any Python class it can override its constructor (the init() function) and stuff all sorts of additional data in the instance. So you could open a file in the init() function, store the filehandle as instance data and write data to this file in every call to the call() function.
pseudocode:
import Blender
class Bla(Blender.Node.Scripted):
def init(self, sockets):
… define input and output sockets for the node …
self.myfile=open(‘filename’, ‘w’)
def call(self):
… do things with input and output sockets here …
self.myfile.write(‘interesting stuff to write to file’)
Examples can be found on:
http://wiki.blender.org/index.php/Resources/PyNode_Cookbook