Passing the password to winpdb with -p is unsupported on unix, because of security issues (the command line parameters can be seen by anyone). However there is an undocumented --rid parameter which takes an integer which is used to construct a file name which will contain the password (beware: no newline after the password). winpdb will delete this password file after reading it. You should create this file it with appropriate permissions.
Here's a bash haiku to show what I mean:
RID=$RANDOM; echo -n 'test' >/home/marko/.rpdb2_settings/passwords/$RID; winpdb --rid $RID --attach yourscript.py