asyncore module

Discussion in 'Python' started by Markus Franz, Jun 13, 2004.

  1. Markus Franz

    Markus Franz Guest

    Hi.

    Some URLs are passed to a python script as command line options like the
    following command

    ../script.py http://www.websites1.com http://www.website2.com

    (The number of passed URLs varies...)

    Now my problem is:

    How can I load and show the contents of these websites (from sys.argv) in
    parallel by using the asyncore module? At the moment I use the following
    script (it uses one child process for each URL):


    import sys, os
    for url in sys.argv[1:]:
    pid = os.fork()
    if pid == 0:
    # placeholder for the loading routine
    print website_contents
    break


    Is the same possible with the asyncore module?
    Thank you.


    Markus Franz
     
    Markus Franz, Jun 13, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Welsh

    asyncore asynchat

    Michael Welsh, Jul 15, 2003, in forum: Python
    Replies:
    0
    Views:
    517
    Michael Welsh
    Jul 15, 2003
  2. Garth
    Replies:
    0
    Views:
    372
    Garth
    Jul 24, 2003
  3. Chris
    Replies:
    3
    Views:
    1,294
    Ng Pheng Siong
    Aug 28, 2003
  4. Stéphane Ninin

    asyncore question

    Stéphane Ninin, Sep 12, 2003, in forum: Python
    Replies:
    6
    Views:
    509
    A.M. Kuchling
    Sep 29, 2003
  5. Markus Franz

    asyncore module for loading websites

    Markus Franz, Jun 23, 2004, in forum: Python
    Replies:
    2
    Views:
    323
    Andrew Bennetts
    Jun 24, 2004
Loading...

Share This Page