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


Groups > comp.lang.python > #38578

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>
Date 2013-02-10 17:26 +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.1584.1360513617.2939.python-list@python.org> (permalink)

Show all headers | View raw


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

Hi Dave,
This is good code, simple but makes the Coding Standard better.. Thanks to
all again

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

> Kind of like below:
>
> david@david-HP-Compaq-dc7600-Convertible-Minitower:~$ python
> Python 2.7.3 (default, Aug  1 2012, 05:16:07)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> f = open("/home/david/file_doc.doc",'a')
> >>> text = "data here"
> >>> f.write("***Start File***\n%s\n***End File***\n" % text)
> >>> f.close()
> >>>
>

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:26 +0100

csiph-web