Wumbate 0 Newbie Poster

I'm trying to make a Python script that makes a HTTP POST with some headers, and with a file as the body. I've found all sorts of documentation online about making a HTTP POST with headers, but can't figure out how to make the POST with a file as a body.

The file is actually uploaded via another HTML POST. My program's architecture looks like this:

User uploads file via HTML Post -> Python script -> POST file to a website

Is this doable in Python?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.