You could run your Python program in the VTE (see edit->pref->terminal->run programs in the VTE).