There is a working example in Make a Video in JMP with FFmpeg . It is using the FFmpeg executable, not a python executable, but it does show both reading from stdout and writing to stdin. The read function just echos to the JMP log, but you can buffer the text and do something else if you like. The write function is streaming images to FFmpeg for encoding, one at a time.
With FFmpeg, it is useful to have the real time echo to the JMP log as images are passed in to FFmpeg; it lets me see if something is wrong in the middle of a long process. If you have a shorter process, with a single (possibly large) output at the end, you'll find it more convenient to use readfunction("text" or "blob") which lets JMP buffer the stdout into a single string that is returned. It also doesn't require waiting (see end of example) for the RunProgram to terminate to get the results. On the other hand, using readfunction(function(...)) does allow JMP to start processing output while it is being generated.
If the python program outputs a CSV to stdout, readfunction should use a blob for two reasons (even though the data should be 7-bit ASCII): a blob can be bigger than 2GB but a JSL string can't, and you can load the blob as dt = open( blobVariable, "csv"). Put a header on the CSV and it is useful even if you only need to return a few named values as a table with a single row.
There is some example python code buried in Beowulf, Newton, and Mr Hanson that reads command line parameters -- search for getopt --, but you can probably find easier to use examples elsewhere. In that example, JMP is using plink (from putty) to run python on a remote machine, and using an NFS disk on the network to share data.
Craige