When dealing with scripting objects that need to modify the parameters of linked parts, it woul d be very handy to be able to visually see the link number of a specified prim in a linked object. I suggest that the easiest way to achieve this, with the least fuss, is to display the link number of a selected prim, when in 'edit linked parts' mode, on the edit window someplace.
That way we could select the prim we need to modify in the script and copy down the link number.
As things stand right now, the only prim you can easily determine the link number for, is the root prim, the rest require trial and error, or other cumbersome means.