Setting progress bar values

I’ve looked through the blender api, searched google, asked exporter developers, searched the forums, and haven’t been able to find any information on how to set blender’s progress bar values through a python script. I have a script that takes several minutes up to hours to execute, and a progress bar would be nice, rather than just spewing out numbers to the console. I’m looking for a quick example of setting the value, as well as some text to the progress bar if possible. If anyone can help me that’d be great!