I have a script, called test.py, that does the following:
while (1):
....print "hello world"
(this script simply prints 'hello world' continuously).

Now, I am using two machines (machine A and machine B). Same user is used for both machines. I would like to do the following:
(1)   [working with machine A]   run test.py programatically on machine A {  meaning, a local python script will be running test.py using say os.system(....)  }
       ( at this point, the script test.py is printing "hello world" to the screen of machine A )
(2)   [working with machine B]   I now want to log in into machine A using ssh and 'view' the output of the script that we ran in (1)
How do I achieve this?  I know how to write the script that will be running and starting test.py on machine A. I also know how to ssh from machine B to machine A.
What I don't know is:
(*)    What command should I use in (1) in order to run the python script so that its output can be easily viewed while logging from a different machine (machine B) to machine A?
(*)    Following the ssh from machine B to machine A, how do I 'navigate' to the screen that shows the output of test.py?
A very quick alternative is to pipe the output of your python program to a file, and then simply using tail with the second user to see the output as it's being written to the file. However, with a program like you have there, the file will very quickly become massive.
View Script Output Over SSH?