Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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; 'interpreter': 0.04; 'output': 0.04; 'subject:Python': 0.05; 'subject:file': 0.07; 'type,': 0.07; 'python': 0.09; "'''": 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'scripting': 0.09; 'subject:2.7': 0.09; 'terry': 0.09; 'skip:f 30': 0.15; 'language:': 0.16; 'pythonwin': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'simplified': 0.16; 'subject: \n ': 0.16; 'toolbar': 0.16; 'wrote:': 0.17; 'documented': 0.17; 'jan': 0.18; 'team,': 0.18; 'feb': 0.19; 'python?': 0.20; 'bit': 0.21; 'addition,': 0.21; 'doc': 0.22; 'programming': 0.23; 'script': 0.24; 'allows': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'am,': 0.27; 'embedded': 0.27; 'guess': 0.27; '(as': 0.27; '2.6': 0.27; 'interface': 0.27; 'options': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'lines': 0.28; 'vector': 0.29; 'url:download': 0.29; '(including': 0.30; 'code': 0.31; 'url:python': 0.32; 'file': 0.32; 'to:addr:python-list': 0.33; 'whatever': 0.35; 'saved': 0.35; 'skip:* 20': 0.35; 'pm,': 0.35; 'received:org': 0.36; 'url:org': 0.36; 'subject:with': 0.36; 'uses': 0.37; 'far': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'days': 0.60; 'different': 0.63; 'here': 0.65; 'improvement.': 0.65; 'teaching': 0.66; 'hoping': 0.72; 'extensions.': 0.84; 'lightweight': 0.84; 'received:fios.verizon.net': 0.84; 'subject:Any': 0.84; 'vba': 0.84; 'rusi': 0.91; 'poorly': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7 Date: Sat, 09 Feb 2013 14:56:09 -0500 References: <1b30052d-a7b7-40f6-af5c-5bb6b6bc4424@4g2000pbt.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <1b30052d-a7b7-40f6-af5c-5bb6b6bc4424@4g2000pbt.googlegroups.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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 47 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360439810 news.xs4all.nl 6951 [2001:888:2000:d::a6]:50409 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38537 On 2/9/2013 11:21 AM, rusi wrote: > On Feb 9, 7:27 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? > > If it were not for the doc file type, its a couple of lines of code to > do what you are asking. > > With doc files however its a bit of a headache. > MSOffice doesn't script with python (as far as I know). It can be with the pythonwin extensions. > Best to use whatever it allows -- VBA I guess > Libreoffice allows a number of different scripting options including > python -- all poorly documented and obsolete. > eg http://www.openoffice.org/udk/python/scriptingframework/ LibreOffice 4.0.0, released 2 days ago, upgrades the bundled Python from 2.6 (itself an upgrade) to 3.3! https://www.libreoffice.org/download/4-0-new-features-and-fixes/ One new addition, also from the above ''' "LibreLogo" vector graphics language: Logo toolbar and interpreter Logoposter en.jpg Turtlegraphics.png Logochessboard.png The lightweight implementation (1400 lines in Python-PyUNO) uses the embedded Python to give a simplified programming interface to the excellent vector graphics of LibreOffice for graphic design and education (including teaching of word processing). ... ''' I am hoping the PyUNO doc will see improvement. -- Terry Jan Reedy