RE: Speed of shutil.copy vs os.system("copy src dest") in win32

Discussion in 'Python' started by Tim Golden, Apr 27, 2006.

  1. Tim Golden

    Tim Golden Guest

    [Russell Warren]

    | I just did a comparison of the copying speed of shutil.copy
    | against the
    | speed of a direct windows copy using os.system. I copied a file that
    | was 1083 KB.
    |
    | I'm very interested to see that the shutil.copy copyfileobj
    | implementation of hacking through the file and writing a new one is
    | significantly faster... any clue as to why this is? I figure I'm
    | missing something here.

    There are a couple of other options as well which
    may or may not be faster. I'd meant to time things
    before putting this page up but never got round to
    it; maybe I'll give it another go:

    http://tgolden.sc.sabren.com/python/win32_how_do_i/copy-a-file.html

    TJG

    ________________________________________________________________________
    This e-mail has been scanned for all viruses by Star. The
    service is powered by MessageLabs. For more information on a proactive
    anti-virus service working around the clock, around the globe, visit:
    http://www.star.net.uk
    ________________________________________________________________________
    Tim Golden, Apr 27, 2006
    #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. bmgz
    Replies:
    1
    Views:
    1,105
    Hans Nowak
    Dec 16, 2003
  2. Joe

    file copy shutil

    Joe, Feb 9, 2004, in forum: Python
    Replies:
    1
    Views:
    334
    Michael Hudson
    Feb 9, 2004
  3. Russell Warren
    Replies:
    1
    Views:
    778
    Tim Roberts
    Apr 27, 2006
  4. dave
    Replies:
    6
    Views:
    1,024
  5. Fletcher Johnson

    Why is the shutil module called shutil?

    Fletcher Johnson, Sep 24, 2011, in forum: Python
    Replies:
    11
    Views:
    868
    alex23
    Sep 26, 2011
Loading...

Share This Page