2 python questions!

Discussion in 'Python' started by Guest, Sep 5, 2007.

  1. Guest

    Guest Guest

    Hi python community!
    First question has to do with threading support. There is the
    following simple case:
    I have a dictionnary that gets it's values -which are url's-from a
    function. Sort of

    dictionnary['1'] = "http://www.google.com"
    dictionnary['2'] = "http://www.python.com"
    .....

    I need to fill in the dictionnary with some url's. If I do it on
    the simplest way, it would be like:

    for i in range(20):
    dictionnary["%s" % i] = get_urls(args)

    and wait a long long time till it finishes. Can I do it easily with
    threads, without having to add too much code? Ideal case would be
    if all threads start simultaneously :)


    Now the second question has to do with images retrieval and
    manipulation. Which libraries do you propose to work with to
    retrieve and resize images from the web?


    Thanks in advance for any help!


    --
    Handyman Franchises. Click Here.
    http://tagline.hushmail.com/fc/Ioyw6h4fMyhGJzTqAUMT4o9Inh2I0NfM85HrFhPDGb7fSaLiZQZqWk/
    Guest, Sep 5, 2007
    #1
    1. Advertising

  2. wrote:
    [...]

    > Now the second question has to do with images retrieval and
    > manipulation. Which libraries do you propose to work with to
    > retrieve and resize images from the web?


    urllib.urlretrieve() and
    Python Imaging Library (PIL)
    Christof Winter, Sep 5, 2007
    #2
    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. Ali Syed
    Replies:
    3
    Views:
    544
    Mark McIntyre
    Oct 13, 2004
  2. pkirk25
    Replies:
    50
    Views:
    1,092
    Bill Pursell
    Oct 4, 2006
  3. Replies:
    10
    Views:
    538
  4. Vijay
    Replies:
    2
    Views:
    572
    Öö Tiib
    May 7, 2010
  5. reema
    Replies:
    0
    Views:
    243
    reema
    Aug 26, 2008
Loading...

Share This Page