Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38584
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mortenengv@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; 'subject:Python': 0.05; 'none,': 0.05; 'f.close()': 0.07; 'none):': 0.07; 'subject:file': 0.07; 'function:': 0.09; 'subject:2.7': 0.09; 'cc:addr:python- list': 0.10; 'def': 0.10; 'skip:f 30': 0.15; '"some': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'feb': 0.19; 'email addr:gmail.com>': 0.20; 'cc:no real name:2**0': 0.24; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'skip:& 10': 0.29; 'function': 0.30; 'text,': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'thanks': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'subject:with': 0.36; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'your': 0.60; 'great': 0.64; 'here': 0.65; 'reply': 0.66; '2013': 0.84; 'subject:Any': 0.84 |
| 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=qY3pn68C9bsAItIBdrlana8naqEWvF+gaI1DkcFAL4I=; b=l6abhniHtpb8mb/t1pAH71hvecz63ODpj5QpR/6TpC3lHytL7psiqXZ2w7M9jhtO1Q m9HGHkFLL9x0TH3+03Gvl2BzqrRL2kNa/8dMESsnL9OuE734LQx3JCoTPoEmDYBpHTDa vxnKL3aDYNkbrxAmdtSvQ6g8+m2cPA0JI243XMMgkcBwHZYTBN4Qfk1WnJ6FH4MmZlTn DbIXR9qLus2WXeUqaQhZF/MfQNSsYJbnqtTHI+z7aQoNWYww877w3qNmwJ2JpzynBKCw PzN51NMON7QVPWY/Qrg0p1nWy4Ssc+sDmGeLLql5N4iIatr/nb1UCFku+B6M53ReJWj1 FH0Q== |
| MIME-Version | 1.0 |
| X-Received | by 10.180.90.145 with SMTP id bw17mr5542062wib.12.1360515652608; Sun, 10 Feb 2013 09:00:52 -0800 (PST) |
| In-Reply-To | <CA+vVgJVVeY0BVPFhu9i4zFVj5vU0uA_zev3aYtZzyYZWgUOnsA@mail.gmail.com> |
| References | <CAJ2vgs7cPKtb3fv=heMtfV7nS-15G+4npRVCkJLqx-CAkrMgVQ@mail.gmail.com> <1670212.1goHRf2svO@mach-114-20> <CAJ2vgs4s3UrrUG7B9mJhZ00ZZuFUaADKqYDKCPR8pNvai-mcCQ@mail.gmail.com> <CA+vVgJUc5obkPvjMmSXm_HVHZV+Y+XgN7fofT8pyaq=Yzm_+mA@mail.gmail.com> <CAJ2vgs4iizRLiGjo=u-Tr_kC8e7u3_aOCPWwtrPYATMQy+3Svg@mail.gmail.com> <CA+vVgJXwBpAYcmnu8xvGj7FwHUO0DOUMh9L8qp8wGhtoDZHs4g@mail.gmail.com> <CA+vVgJVVeY0BVPFhu9i4zFVj5vU0uA_zev3aYtZzyYZWgUOnsA@mail.gmail.com> |
| Date | Sun, 10 Feb 2013 18:00:52 +0100 |
| Subject | Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7 |
| From | Morten Engvoldsen <mortenengv@gmail.com> |
| To | David Hutto <dwightdhutto@gmail.com> |
| Content-Type | multipart/alternative; boundary=f46d043be1c42f62ad04d561bcdc |
| Cc | python-list@python.org, inq1ltd <inq1ltd@inqvista.com> |
| 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.1590.1360515659.2939.python-list@python.org> (permalink) |
| Lines | 52 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1360515659 news.xs4all.nl 6961 [2001:888:2000:d::a6]:53153 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38584 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi Dave,
Thanks for your reply with full function :) Great forum.. :)
On Sun, Feb 10, 2013 at 5:46 PM, David Hutto <dwightdhutto@gmail.com> wrote:
> Here is the full function with an instance using the function:
>
> def text_wrapper(file_name = None, pre_text = None, text = None,
> post_text = None):
> f = open(file_name, 'a')
> f.write("%s\n%s\n%s\n" % (pre_text, text, post_text))
> f.close()
>
>
> text_wrapper(file_name = r"/home/david/file_doc.doc", pre_text =
> "***Start File***", text = "Some data here.", post_text = "***End
> File***")
>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7 Morten Engvoldsen <mortenengv@gmail.com> - 2013-02-10 18:00 +0100
csiph-web