Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'f.close()': 0.07; 'subject:file': 0.07; 'python': 0.09; 'subject:2.7': 0.09; 'cc:addr:python-list': 0.10; 'aug': 0.13; '2.7.3': 0.16; 'here"': 0.16; 'here"': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'code,': 0.18; 'feb': 0.19; 'email addr:gmail.com>': 0.20; '>>>': 0.22; '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; 'coding': 0.27; 'message- id:@mail.gmail.com': 0.27; 'skip:& 10': 0.29; 'skip:& 20': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'thanks': 0.34; 'pm,': 0.35; 'but': 0.36; 'subject:with': 0.36; 'subject:: ': 0.38; 'kind': 0.61; 'more': 0.63; 'below:': 0.71; '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=c7P62sH4nk+/GNEAroIQDjZYz0C/CTw/monUDD+nksU=; b=cjblmaqlUteAEotQvo0+E2EEBAfY8qwRmh00KDHfykuoq/amqaxyBBjeT9e3t77fHX 1/P2KG1gxArMOL27VaEZRI/MEaCXw5Htc//ibOCvWONaWaFrDa7w8Vi52Yw6NrSc7AHu BL/vU4U32G7QU0B/bUjS9lSPADsWRbV4bgWKG2MFBnwM09N0qcBkw2quLFmBWHhf6vEq infiIULqq2GunwBP9bG8TfbIGTHnGWI6KjizDCoB8PIbjp7lrWcEoqIrIdT3aB+l+Z2Y nSjRiYAUQMMOIsphRm1R4tqm5Popzu6rtIXxNlgMoIXtj/o4UwEr6djQga3Vy3MY0/gr u7Qg== MIME-Version: 1.0 X-Received: by 10.180.84.162 with SMTP id a2mr11535238wiz.14.1360513609315; Sun, 10 Feb 2013 08:26:49 -0800 (PST) In-Reply-To: References: <1670212.1goHRf2svO@mach-114-20> Date: Sun, 10 Feb 2013 17:26:49 +0100 Subject: Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7 From: Morten Engvoldsen To: David Hutto Content-Type: multipart/alternative; boundary=f46d0442719465366204d5614268 Cc: python-list@python.org, inq1ltd X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360513617 news.xs4all.nl 6841 [2001:888:2000:d::a6]:33595 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38578 --f46d0442719465366204d5614268 Content-Type: text/plain; charset=ISO-8859-1 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 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() > >>> > --f46d0442719465366204d5614268 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Dave,
This is good code, simple but makes the Coding Stan= dard better.. Thanks to all again

O= n 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 =A01 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "= license" for more information.
>>> f =3D open("/home/david/file_doc.doc",'a') >>> text =3D "data here"
>>> f.write("***Start File***\n%s\n***End File***\n" % t= ext)
>>> f.close()
>>>

--f46d0442719465366204d5614268--