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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'none,': 0.05; 'f.close()': 0.07; 'none):': 0.07; 'subject:file': 0.07; 'open(file,': 0.09; 'subject:2.7': 0.09; 'cc:addr:python- list': 0.10; 'def': 0.10; 'subject: \n ': 0.16; '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; 'text,': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'received:209.85': 0.35; 'subject:with': 0.36; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'mean': 0.38; '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=LwBuyF7T0N1RM9yUpDov4WxZlVytj+UCyMuFctUQDbA=; b=Lk1UcC03MI0MKOhbu452dlLUUd3s1eIoQPpR0qli0TulPlMr99pvAVJeSVNAJui7dj JdMwSo+YyvQ9zLL03sglreymcpKSBXkKNqZdTyfgwkQMV+1uspzDUlevowXRUcidDY5N bN5qqX6Z7KthwvFAj1jXSNyALFCIJaWEwUjtYVPeSAWPu/p4hGl1tijISO85h9KgnzD8 RtRAVrOV2RPbPKKB4YhxMjE+SNV4Lvu0lpm2KKbjCypbj/+YAjs2NZK69hzws1t0TbS8 HTLHsV6TuEEnMHMJUnCE6vOju6S/ttvfbxOVL7QYaqQNvWAVrXnxs4WPj63J9wdh09PY 6DsA== MIME-Version: 1.0 X-Received: by 10.224.222.15 with SMTP id ie15mr4589371qab.75.1360514009966; Sun, 10 Feb 2013 08:33:29 -0800 (PST) In-Reply-To: References: <1670212.1goHRf2svO@mach-114-20> Date: Sun, 10 Feb 2013 11:33:29 -0500 Subject: Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7 From: David Hutto To: Morten Engvoldsen Content-Type: text/plain; charset=ISO-8859-1 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: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360514018 news.xs4all.nl 6954 [2001:888:2000:d::a6]:38438 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38580 Oops, I mean : 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, text, post_text) f.close()