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

Morten Engvoldsen mortenengv at gmail.com
Sun Feb 10 11:26:49 EST 2013


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 at gmail.com> wrote:

> Kind of like below:
>
> david at 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()
> >>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130210/18fd59e8/attachment.html>


More information about the Python-list mailing list