but i want the proc.write to be user defined from my gui ....
I'm not entirely sure what you mean by this -
but assuming that you want the user to dictate what gets written, you could simply catch user input in a QlineEdit or something similar and use its text as the arguement to the proc.write function.