Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!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.005 X-Spam-Evidence: '*H*': 0.99; '*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; 'subject: \n ': 0.16; '>>>': 0.18; '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; '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; 'kind': 0.61; 'more': 0.63; 'below:': 0.71; '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=oGAWrw1FFSn0a8gcvjhZjALGQSnSiU1Xn6u+N7TFpFM=; b=ySaX0WN5Pfo5La5YMvP+DVJ/9pqHeBNFeMLr0kzUZSQwtgb7fcpdPdQCl9ilTH38NF PzFL6Nc5umbXkXgna1yTOQKuCBmpoE5rOkHuJ4z2GtGKYVESas/+TZ5AUmKk3nbAYpJF Z+ODhfIttSFngwpFfe6qOvi0J2G1QLSz6IKgm5LnURdU16anPD/6rCqGx3osKE/YkG2v P+hBG9ZjkmmckLRB7LFtaNN1hq/5hG+7q/5zFrUvDjWqv0tEJRFipNFiMD8cRY47G6Jp Xlbosv9n0LZeQDn4/HF883H+dQVM5+gLvnlXxNNUMw8CBbSoyii+p8NUA8EKvNydWVct uVBA== MIME-Version: 1.0 X-Received: by 10.224.71.20 with SMTP id f20mr4547460qaj.91.1360512089544; Sun, 10 Feb 2013 08:01:29 -0800 (PST) In-Reply-To: References: <1670212.1goHRf2svO@mach-114-20> Date: Sun, 10 Feb 2013 11:01: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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360512098 news.xs4all.nl 6856 [2001:888:2000:d::a6]:55064 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38577 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() >>>