I have two computers on a network. I'll call the computer I'm working on computer A and the remote computer B. My goal is to send a command to B, gather some information, transfer this information to computer A and use this in some meaningfull way. My current method follows:

Establish a connection to B with paramiko.
Use paramiko to execute a remote command e.g. paramiko.exec_command('python file.py').
Write the information to a file with pickle, and use paramiko.ftp to transfer the file to  computer A.
Open this file and parse the information back into a usable form, like a class or dictionary. 

This seems very ad-hoc. My question is, is there a better way to transfer data between computers using Python? I know how to transfer files, this is a different question. I want to make an object on B and use it on A.
I have been doing something similar on a larger scale (with 15 clients). I use the pexpect module to do essentially ssh commands on the remote machine (computer B). Another module to look into would be the subprocess module.
How do I transfer data between two computers ?