Oddity is shutil.copyfileobj

Discussion in 'Python' started by Neil Benn, Jan 20, 2005.

  1. Neil Benn

    Neil Benn Guest

    Hello,

    I'm running a program which is using shutil.copyfileobj on a
    Win2K Pro, python 2.3 box. The source and dest file are both opened in
    textual mode as 'w', the source file on the local hard drive and the
    dest file is on a file server (transmitted through a samba server), the
    block size for copying is not entered - so the default setting is used
    (whatever that is).

    The files are copied across perfectly (diffing them shows they are
    identical), however I have one small problem, the destination filename
    has .read appended to the end. I've checked my code again and again and
    I'm definatly not apeending this.

    I'm also copying files across, in the same program but the source
    and dest are binary - this doesn't have the same problem, the filenames
    are not changed.

    My question is - has anyone else seen this behaviour?

    Cheers,

    Neil

    --

    Neil Benn
    Senior Automation Engineer
    Cenix BioScience
    BioInnovations Zentrum
    Tatzberg 47
    D-01307
    Dresden
    Germany

    Tel : +49 (0)351 4173 154
    e-mail :
    Cenix Website : http://www.cenix-bioscience.com
     
    Neil Benn, Jan 20, 2005
    #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,146
    Hans Nowak
    Dec 16, 2003
  2. Joe

    file copy shutil

    Joe, Feb 9, 2004, in forum: Python
    Replies:
    1
    Views:
    353
    Michael Hudson
    Feb 9, 2004
  3. Stéphane Ninin

    shutil.move, permission denied, why ?

    Stéphane Ninin, Apr 6, 2004, in forum: Python
    Replies:
    8
    Views:
    1,404
    Stéphane Ninin
    Apr 8, 2004
  4. Tim Golden

    RE: Oddity is shutil.copyfileobj

    Tim Golden, Jan 20, 2005, in forum: Python
    Replies:
    0
    Views:
    414
    Tim Golden
    Jan 20, 2005
  5. Fletcher Johnson

    Why is the shutil module called shutil?

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

Share This Page