It looks like you're new here. If you want to get involved, click one of these buttons!
there was another forum entry about the same question: http://klayout.de/forum/comments.php?DiscussionID=230&page=1#Item_4.
I shall explain a little regarding the concepts and the question you raised in your code:
The API for creating and changing PCell parameters will be enhanced in the next release, so it will be possible for example to modify PCell parameters by name.
there is a brief description here: http://www.klayout.de/doc/about/basic_lib.html#h2-44.