Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'error:': 0.05; 'skip:o 50': 0.07; 'subject:help': 0.07; '"w")': 0.09; 'ioerror:': 0.09; 'rows': 0.09; 'stored': 0.10; 'advance': 0.10; 'csv': 0.16; 'skip:g 50': 0.16; 'writer': 0.16; 'skip:g 40': 0.17; 'subject:need': 0.17; 'skip:" 40': 0.20; 'to:name:python- list@python.org': 0.20; 'import': 0.21; "skip:' 40": 0.22; '(most': 0.27; 'merge': 0.27; 'message-id:@mail.gmail.com': 0.27; 'skip:& 10': 0.29; 'folder': 0.30; 'mode': 0.30; 'subject: : ': 0.30; 'file': 0.32; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'skip:& 20': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'why': 0.37; 'files': 0.38; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'here': 0.65; 'programme': 0.69; 'subject:urgent': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=SEfpZRPPFid2x1JFxTxb+oTihqVZKKDVEtGXsLy8Pe8=; b=hE2bTKRlqLyIjd6zLY4hRmOmhN7nNbZwV21jk8L/rDV3eKzYyKhXsRUDUfaoqCmNP6 O3O2eG+WU7xmaiJvHYz3siChC2rW9VYUkOIMGapCmxxwsp7GKJYfBW3jPeYHmECNo4oS C8R/nprOP0l30r1L3126Jd9ENxYYRJfEkytw3EN8lf+DX6ECQU37kAD2e7p3WMVKYqfJ VP8Ucap7FUMnz8owaZ898rKnf4aiUBw4S+f6x6hieugQDxse1VEE///5yYNygU2BCAvp 0v9+J36aTnw9Gh5uB5/vBwvJ+FJMF9gfgAt0a+KMMZMZzLbNNm9etP1smlNp//4v1EtP r66A== MIME-Version: 1.0 X-Received: by 10.43.17.199 with SMTP id qd7mr7653129icb.52.1361287633182; Tue, 19 Feb 2013 07:27:13 -0800 (PST) Date: Tue, 19 Feb 2013 16:27:13 +0100 Subject: IOerror : need urgent help From: inshu chauhan To: "python-list@python.org" Content-Type: multipart/alternative; boundary=bcaec51968c9d0217e04d615798c X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 48 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361288031 news.xs4all.nl 6921 [2001:888:2000:d::a6]:54037 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39231 --bcaec51968c9d0217e04d615798c Content-Type: text/plain; charset=ISO-8859-1 Here is my attempt to merge 10 files stored in a folder into a single file : import csv with open("C:\Users\inshu.chauhan\Desktop\test.arff", "w") as w: writer = csv.writer(w) for f in glob.glob("C:\Users\inshu.chauhan\Desktop\For Model_600\*.arff"): rows = open(f, "r").readlines() writer.writerows(rows) Error: Traceback (most recent call last): File "C:\Users\inshu.chauhan\Desktop\Mergefiles.py", line 3, in with open("C:\Users\inshu.chauhan\Desktop\test.arff", "w") as w: IOError: [Errno 22] invalid mode ('w') or filename: 'C:\\Users\\inshu.chauhan\\Desktop\test.arff' Why my programme is not working ?? :( Thanks in Advance !! --bcaec51968c9d0217e04d615798c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Here is my attempt to merge 10 files stored= in a folder into a single file :

import csv

with open("= ;C:\Users\inshu.chauhan\Desktop\test.arff", "w") as w:
= =A0=A0=A0 writer =3D csv.writer(w)
=A0=A0=A0 for f in glob.glob("C:\Users\inshu.chauhan\Desktop\For Model= _600\*.arff"):
=A0=A0=A0=A0=A0=A0=A0 rows =3D open(f, "r"= ).readlines()
=A0=A0=A0=A0=A0=A0=A0 writer.writerows(rows)


Error:

Traceback (most recent call last):
=A0 File "C:\Users\inshu.chauhan\Desktop\Mergefiles.py", line 3, = in <module>
=A0=A0=A0 with open("C:\Users\inshu.chauhan\Deskt= op\test.arff", "w") as w:
IOError: [Errno 22] invalid mod= e ('w') or filename: 'C:\\Users\\inshu.chauhan\\Desktop\test.ar= ff'

Why my programme is not working ?? :(

Thanks in Adva= nce !!



--bcaec51968c9d0217e04d615798c--