Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38581

Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7

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> <CA+vVgJWh=NRvndKO-ppewXJOLf5US170V-gQ43bNAx8THQ-kLQ@mail.gmail.com>
Date 2013-02-10 17:45 +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>
Newsgroups comp.lang.python
Message-ID <mailman.1587.1360514712.2939.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Dave,
Thanks again for suggestion....

On Sun, Feb 10, 2013 at 5:30 PM, David Hutto <dwightdhutto@gmail.com> wrote:

> I haven't looked at  text wrapper, but it would probably look
> something like this in a function, untested:
>
> def text_wrapper(file_name = None, pre_text = None, text = None,
> post_text = None):
>     f = open(file, 'a')
>     f.write("%s\n%s\n%s\n" % (pre_text = None, text, post_text = None)
>     f.close()
>
>
> --
> Best Regards,
> David Hutto
> CEO: http://www.hitwebdevelopment.com
>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


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 17:45 +0100

csiph-web