Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'none,': 0.05; 'f.close()': 0.07; 'function,': 0.07; 'none)': 0.07; 'none):': 0.07; 'subject:file': 0.07; 'open(file,': 0.09; 'subject:2.7': 0.09; 'cc:addr:python-list': 0.10; 'looked': 0.10; 'def': 0.10; 'skip:f 30': 0.15; 'subject: \n ': 0.16; 'wrote:': 0.17; 'feb': 0.19; 'email addr:gmail.com>': 0.20; "haven't": 0.23; '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; 'probably': 0.29; 'received:74.125.82': 0.33; 'text,': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'thanks': 0.34; 'pm,': 0.35; 'something': 0.35; 'but': 0.36; 'received:74.125': 0.36; 'subject:with': 0.36; 'subject:: ': 0.38; '2013': 0.84; 'subject:Any': 0.84; 'wrapper,': 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=puS2ng3pLdq/MzHiz/35SSyzvyXJ1hRVoM7HekA5dgY=; b=a20ewGl3E9G0BNdLqk1gbFh4LKb9lSYSkO50fQT8z4tiZlAvGmQx8BYZUjVOLL/CaE DGtS7o9+xYn34ECoO6JQttWtcFsuYpay5mX38qTodMK0i4qpTSUtwtKCIap/HPPDCPxe Vyc7m+kKrIiy6ofbEazCgFp500UUBLsLqfEypmuUMS03yQnYfCoMkK/EJVX6icBvTTqz oOh5kaKUU8XKKXbHKQqwM4wB9A/94Lm0yEXKWBZwO9kbuNw089aQcKBqYeOvCBd9+zsb KbmXPg0/DwFUjkqv7+ReGJJ/ArfheYG+4dSkNK2frVDZ0HMSpVSWV1bOoMvnf2hlmB2K B1Ug== MIME-Version: 1.0 X-Received: by 10.194.94.37 with SMTP id cz5mr19374917wjb.49.1360514705029; Sun, 10 Feb 2013 08:45:05 -0800 (PST) In-Reply-To: References: <1670212.1goHRf2svO@mach-114-20> Date: Sun, 10 Feb 2013 17:45:04 +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=047d7bb03c2ab47ac804d5618373 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: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360514712 news.xs4all.nl 6949 [2001:888:2000:d::a6]:42114 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38581 --047d7bb03c2ab47ac804d5618373 Content-Type: text/plain; charset=ISO-8859-1 Hi Dave, Thanks again for suggestion.... On Sun, Feb 10, 2013 at 5:30 PM, David Hutto 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 > --047d7bb03c2ab47ac804d5618373 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Dave,
Thanks again for suggestion....

On Sun, Feb 10, 2013 at 5:30 PM, David Hutto <dw= ightdhutto@gmail.com> wrote:
I haven't looked at =A0text wrapper, but it would prob= ably look
something like this in a function, untested:

def text_wrapper(file_name =3D None, pre_text =3D None, text =3D None,
post_text =3D None):
=A0 =A0 f =3D open(file, 'a')
=A0 =A0 f.write("%s\n%s\n%s\n" % (pre_text =3D None, text, post_t= ext =3D None)
=A0 =A0 f.close()


--
Best Regards,
David Hutto
CEO: http://= www.hitwebdevelopment.com

--047d7bb03c2ab47ac804d5618373--