Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3978258
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:01:32+00:00 2026-05-20T05:01:32+00:00

are there any simple examples you know of that demonstrate how a python program

  • 0

are there any simple examples you know of that demonstrate how a python program can pass data to a webserver? ive been looking for so long but i still cannot find any. something simple will do. say for example, a python program that generates some text or number that the webserver accepts and updates a field in a local site with. thank you very much

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:01:32+00:00Added an answer on May 20, 2026 at 5:01 am

    Generally speaking the easiest way to do this would be with urllib2.

    Depending on what exactly you mean by “updates a field in a local site” you probably either want to send data in a GET or POST variable. Below are examples of doing each:

    GET request:

    import urllib2
    
    response = urllib2.urlopen('http://example.com/some/path/?myvar=myvalue')
    

    POST request:

    import urlib2
    
    response = urllib2.urlopen('http://example.com/some/path/', {'myvar': 'myvalue'})
    

    The response object you get back is a file like object. Accordingly if you want to get the string contents of the response, you can simply call response.read() or if you want to look at the metadata of the response (e.g. headers, http status code, etc) you can call the response.info() method.

    Finally a bit of advice for future, similar searches you probably will have more luck using the terminology “how to make an HTTP request with python” instead of “how to pass data to a webserver in python”. You will generally get much better results looking for details on how to accomplish a specific action action as opposed to a more general goal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone post any simple explanation of cache aware algorithms? There are lot of
Is there any simple algorithm to determine the likeliness of 2 names representing the
Is there any simple way to programatically colorize images in .NET? Basically we have
Is there any simple way to generate a default crud (given an entity) with
I'm wondering if there are any simple ways to get a list of all
Very simple question, is there any cloud server enviroments avaliable these days for us
I need a simple app to edit database tables. Are there any code generators
Is there a freely available library to create a MPEG (or any other simple
I hope this is a simple enough question for any SQL people out there...
Wondering if there is any way to get the lambda expressions that result from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.