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

  • SEARCH
  • Home
  • 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 6566727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:15:01+00:00 2026-05-25T14:15:01+00:00

Hi I need to process a remote .ical file from another server on my

  • 0

Hi I need to process a remote .ical file from another server on my own server and hand it back to the requesting user.

So what I need to do is:

  • Fetch the file (could do this with urllib2)
  • Process the file with some regex (not the question)
  • hand it back with a specific header <– my main problem

I’d know how to do this with php:

header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: inline; filename=calendar.ics');
echo $ical;
exit;

But how to do the same thing in python?

  • 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-25T14:15:02+00:00Added an answer on May 25, 2026 at 2:15 pm

    Well, as with anything web-related, you start with a WSGI application.

    def app(environ, start_response):
        calendar = get_processed_file()
    
        start_response('200 OK', [
            ('Content-Type', 'text/icalendar; charset=utf-8'),
            ('Content-Disposition', 'inline; filename=calendar.ics'),
        ])
        yield calendar
    

    Then to deploy, you use a handler, e.g. plain CGI would be

    import wsgiref
    wsgiref.CGIHandler().run(app)
    

    See http://www.wsgi.org/ for more materials about WSGI.

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

Sidebar

Related Questions

could someone please explain to me the process of retrieving data from a remote
I need to process a large file, around 400K lines and 200 M. But
I need to process the incoming predefined ASN format data(coming from verity of clients
I have a quite big XML output from an application. I need to process
I need to find out is Process is running on remote machine or not,
I need to program a stateless server to execute remote methods. The client uses
I need to insert millions of records being read from disk into SQL server.
I need to launch a server on the remote machine and retrieve the port
I need to create a shell script to do this: ssh to another remote
Possible Duplicate: PHP Curl script to pull data from remote server every 10 minutes

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.