Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38576

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

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <SRS0=WfGkao=MC=inqvista.com=inq1ltd@eigbox.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'output': 0.04; 'subject:Python': 0.05; 'formatting': 0.07; 'subject:file': 0.07; 'subject:2.7': 0.09; 'textwrap': 0.09; 'skip:f 30': 0.15; 'received:10.20.15.4': 0.16; 'received:bosmailout05.eigbox.net': 0.16; 'received:bosmailscan04.eigbox.net': 0.16; 'wrote:': 0.17; 'team,': 0.18; 'module': 0.19; 'python?': 0.20; 'import': 0.21; 'cc:2**0': 0.23; '&gt;': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'cc:addr:gmail.com': 0.27; 'module.': 0.27; 'file': 0.32; 'to:addr:python-list': 0.33; 'saved': 0.35; 'skip:* 20': 0.35; 'text.': 0.35; 'url:org': 0.36; 'received:71': 0.36; 'subject:with': 0.36; 'charset:us-ascii': 0.36; 'url:rec- html40': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'great': 0.64; 'here': 0.65; 'url:dtd': 0.81; '2013': 0.84; 'subject:Any': 0.84; 'url:strict': 0.91
X-Authority-Analysis v=2.0 cv=FqCHDhXq c=1 sm=1 a=xZbxd6CaXob6mfebiHRcYA==:17 a=spKFjZujUncA:10 a=2Cs5qbXtQ68A:10 a=pRWA4CgrIokA:10 a=OmMKortqy18A:10 a=tTExfe6FAAAA:8 a=IkMCvAvUdXgA:10 a=xPsDcR490f0vCBmbrhcA:9 a=CjuIK1q_8ugA:10 a=P3uMDV8RXKwA:10 a=SSmOFEACAAAA:8 a=_W_S_7VecoQA:10 a=frz4AuCg-hUA:10 a=qMDZ_Ezp4_0A:10 a=E3tM5gFR9JSf2uEh:21 a=f4kFLigMKr8AH7rIJ//qJA==:117
X-EN-OrigOutIP 10.20.18.17
X-EN-IMPSID yfEc1k0020N5uqq01fEcgP
From inq1ltd <inq1ltd@inqvista.com>
To python-list@python.org
Subject Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7
Date Sun, 10 Feb 2013 10:12:41 -0500
User-Agent KMail/4.7.2 (Linux/2.6.37.6-24-desktop; KDE/4.7.2; i686; ; )
In-Reply-To <CAJ2vgs7cPKtb3fv=heMtfV7nS-15G+4npRVCkJLqx-CAkrMgVQ@mail.gmail.com>
References <CAJ2vgs7cPKtb3fv=heMtfV7nS-15G+4npRVCkJLqx-CAkrMgVQ@mail.gmail.com>
MIME-Version 1.0
Content-Type multipart/alternative; boundary="nextPart1435671.6FKpEAYvvs"
Content-Transfer-Encoding 7Bit
X-EN-UserInfo ea107384e720a598200e9790e8ca8002:9d89a6cbd5a73a41b134431a25286195
X-EN-AuthUser inq1ltd@inqvista.com
Sender inq1ltd <inq1ltd@inqvista.com>
X-EN-OrigIP 71.127.133.64
X-EN-OrigHost pool-71-127-133-64.rcmdva.east.verizon.net
Cc Morten Engvoldsen <mortenengv@gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1582.1360511284.2939.python-list@python.org> (permalink)
Lines 75
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1360511284 news.xs4all.nl 6869 [2001:888:2000:d::a6]:52004
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:38576

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Saturday, February 09, 2013 03:27:16 PM Morten Engvoldsen wrote:
> Hi Team,
> I Have saved my output in .doc file and want to format the output with
> 
> *************Start the File ************************
> 
> Some data here
> 
> 
> *******************End of File*****************************
> 
> Can you let me know how can i do that using Python?


Look up the textwrap module 

import the textwrap module.

from the textwrap module you can
import dedent, wrap, and fill  

These are great for formatting text.

jd 
inqvista.com




Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7 inq1ltd <inq1ltd@inqvista.com> - 2013-02-10 10:12 -0500

csiph-web