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

From inq1ltd <inq1ltd@inqvista.com>
Subject Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7
Date 2013-02-10 10:12 -0500
References <CAJ2vgs7cPKtb3fv=heMtfV7nS-15G+4npRVCkJLqx-CAkrMgVQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1582.1360511284.2939.python-list@python.org> (permalink)

Show all headers | 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