P3D v4 Need a little help with Python...

Any fellow simmers good with Python? I am stuck on some coding I am developing and what could take probably a "true coder" a few minutes has stumped me for days o_O (you guessed it, my Python coding is in its beginning stages). Has to do with "randomness" and using QGIS so I guess technically its a pyQGIS issue.

Thx, Clutch
Thx for such a quick reply Matthias. I fear it would take longer to get acquainted with the QGIS API than it would solving the issue, ha :D!, as it appears to be involving some of the QGIS widgets and an attributes error which is the crux of the error message.