Hi mccarthp,
Let me see if I understand this. Windows maintains a variable called errorlevel, which contains the exit code of the most recently executed program, right? And you are trying to read that variable?
Hmm. Off the top of my head, we could try:
import os
keys = os.environ.keys()
keys.sort()
for item in keys: print item, ":", os.environ[item]
But I don't see the errorlevel variable in this list.
Well, I don't know how to query for non-environment variables in DOS, but here's a quick workaround:
import os
f = os.popen("echo %errorlevel%", "r")
text = f.read()
The value of errorlevel should be inside text, along with some whitespace, but you can take care of that yourself, then insert the code into your URL string.