Forge some x input to terminal

I'm working with some data grabbed off the internet and processed with python. eventually I need some code to forge a few keystrokes to Bfgminer based on this information..

I just need a way to push keystrokes to a gnome-terminal in the background so that even if I am at my pc using it, this function is not disturbed. I am working on Ubuntu GNOME 13.10

Some programs that claim to forge x input are...

    expect ( i think )

    xdotool

    There is also a python module event.py.

I have used xdotool to successfully input to a gnome-terminal with an executed shell script. Although it only works if the window is brought to focus.

I have also tried "echo p >" to the various contents of /dev/pts/ which doesnt get interpreted by bfgminer.

Any help is appreciated, this is the last piece to my conky setup. Basically I'm using the same data twice, on one execution interval, since I plan on displaying information in conky with this data aswell. If anybody has any better ideas / alternatives, let me know :)

This is what I have so far if you are interested.... 

hi

here ya go bro

https://teksyndicate.com/forum/code/my-miner-controlling-conky-config/167399

https://github.com/xdaimon/xdaimonConky