Nope. Or at least, you can't do it in the general case. Because the part where you present your credentials to your OpenID provider could be anything, right? Maybe the provider authenticates through a token or a phone call or voice auth or whatever, that's outside the OpenID spec.
So you've got two options. One is to get SO to provide a more accessible API for editing your profile, using some mechanism better suited to automated calls (e.g. OAuth).
The other is, if you're writing this code for your personal use, you can control which OpenID provider you're using and choose one that's scriptable. In the extreme case, you could run your own provider an then put whatever security you wanted between your script and your provider. Or you could just try writing a script with something like Mechanize that logged in to your current provider. (Just be sure you have it be well-behaved with respect to hidden form elements and cookies. Good OpenID providers can be very picky about that stuff, to protect your account from cross-site request forgery attacks.)