Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39349
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <insideshoes@gmail.com> |
| 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; 'python,': 0.02; 'output': 0.04; 'method.': 0.05; 'method,': 0.07; 'shutil': 0.07; 'read()': 0.09; 'subject:module': 0.09; 'windows,': 0.09; 'cc:addr:python- list': 0.10; 'subject:python': 0.11; 'files.': 0.13; 'file,': 0.15; '(read': 0.16; '12:04': 0.16; 'concat': 0.16; 'copying.': 0.16; 'delimiters': 0.16; 'printf': 0.16; 'wed,': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'input': 0.18; 'feb': 0.19; 'module': 0.19; 'cc:2**0': 0.23; 'linux': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'url:mailman': 0.29; 'skip:& 10': 0.29; 'folder': 0.30; 'url:python': 0.32; 'file': 0.32; 'url:listinfo': 0.32; 'received:google.com': 0.34; 'open': 0.35; 'pm,': 0.35; 'but': 0.36; 'url:org': 0.36; 'anything': 0.36; 'subject:with': 0.36; 'should': 0.36; 'possible': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'mean': 0.38; 'some': 0.38; 'sure': 0.38; 'url:mail': 0.40; 'your': 0.60; 'further': 0.61; "you'll": 0.62; 'necessarily': 0.63; 'more': 0.63; '20,': 0.65; 'else.': 0.65; 'skip:c 50': 0.66; 'attention': 0.75; '2013': 0.84; 'mechanics': 0.84; '\xa0but': 0.84; 'write()': 0.91; 'angel': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=A90rPPVJ5TUYRo1t666r3iDPYnqEtoUr144+cxgVDeQ=; b=z3NjTU7yTyELELzW66dTR9d1nYp01nXVCjF6H+882fd477h6KZvQp/lJW/Wp6tkBS4 w20iZxZnxJEKt4u/KQOy6oRGQKcvTvDp0+i2HRxnL7ft2HNVedqRNDY3JHrwpJS0i21c 1EgS7Izogrcyziv9XqG/YcGviENrYwkM47qeN5jxB8Auu6kZ+nCehlWmyeC7FoPqMQtR gfaqvZWtiSqMpnHcGjzIXwIM5LfBjDUjp+mIgXwJcSsAyeKAjJvpiJ8MsSqFqcs7kdpD DHgYkW0uc6pnc3G8/pnGmc/TJAzWwYX2p6lOZBmUAXGBLrujNuSOrUp6gBcz/ak1CkQd n5Aw== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.186.169 with SMTP id fl9mr3260981igc.72.1361359537824; Wed, 20 Feb 2013 03:25:37 -0800 (PST) |
| In-Reply-To | <5124ADAB.6050305@davea.name> |
| References | <CAFqGZRG3wVyf6jMBESjr6bmnLhLsT-_BG0xSH_rcpe4Oqb+1nQ@mail.gmail.com> <20130220102601.GD22457@localhost> <CAFqGZRG3RwgdSjDs1xRpv0YdEV0yXxeFJCefhP+w_6DEdwrwPQ@mail.gmail.com> <5124ADAB.6050305@davea.name> |
| Date | Wed, 20 Feb 2013 12:25:37 +0100 |
| Subject | Re: working with csv module in python |
| From | inshu chauhan <insideshoes@gmail.com> |
| To | Dave Angel <davea@davea.name> |
| Content-Type | multipart/alternative; boundary=14dae9340b81a9e32904d626377b |
| Cc | "python-list@python.org" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2108.1361359540.2939.python-list@python.org> (permalink) |
| Lines | 121 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1361359540 news.xs4all.nl 6953 [2001:888:2000:d::a6]:37127 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:39349 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Wed, Feb 20, 2013 at 12:04 PM, Dave Angel <davea@davea.name> wrote: > On 02/20/2013 05:38 AM, inshu chauhan wrote: > >> On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler <r.koebler@yahoo.de> >> wrote: >> >> >>> <snip> >>> >>> >>> If you only want to concat the files, I would use some shell-tools, >>> like "cat" on Linux or "copy" on Windows, so >>> >>> copy C:\Users\inshu.chauhan\**Desktop\ForModel_600\*.arff >>> C:\Users\inshu.chauhan\**Desktop\test2.arff >>> >>> should do it. >>> >>> <snip> >>> >>> Yes I just want to concat the files , not parse/mangle the files. How >> can >> i simply read all files in a folder in my computer and write them into a >> single file ? just by 'printf ' is it possible ? >> >> >> >> > Reread Roland's message, quoted above for your convenience. > > Not sure what you mean by printf. Why would you use C to do it? > > If you need to do it in Python, remember you can read a file with the > read() method, and write one with the write() method. They pay no > attention to newlines, delimiters or anything else. Just create the output > file, then in a loop open the input files and loop through each (read > doesn't necessarily get the whole thing in one pass) > > You'll spend lots more energy on the mechanics of finding the files then > on the copying. But perhaps the shutil module will have some further > shortcuts. > > -- > DaveA > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > You are right Dave, printf was a blunder
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: working with csv module in python inshu chauhan <insideshoes@gmail.com> - 2013-02-20 12:25 +0100
csiph-web