Ooh now there's an interesting question. Planning some
hardware-in-the-loop loop simulation?
Yes, you could do this in either direction.
First of all presumably you will have some hardware & drivers providing
an RS422 serial port on the machine. So you would use the pyserial
module from http://pyserial.sourceforge.net/ to get a Serial object
providing access to that port.
Then it would be a matter of inserting code into various parts of the
simulation at points where the simulation must either wait for some data
or trigger, or send some. This could be done in various ways, most of
them should be quite straightforward but the details of how best to do
this will depend on what you're trying to achieve. The first question
is, are you intending to run the simulation in real time?
Martin