<div>Hi Cain,</div><div>Thanks for your reply. I am stroning all the contents in "batchdate" and then,</div><div> </div><div>data = base64.encodestring(batchdata)</div><div> </div><div>and then writing "data" in doc file.</div>
<div> </div><div>I know i can append "***************Start file***********" in the batchdata, but is there a better python code like multiply * into 10 times -- any python code i can add the formatting in dynamic way instead of hardcoding with "***************Start file***********" line.</div>
<div> </div><div>Thanks for your reply again.</div><div> </div><div><br><br> </div><div class="gmail_quote">On Sat, Feb 9, 2013 at 3:38 PM, D'Arcy J.M. Cain <span dir="ltr"><<a href="mailto:darcy@druid.net" target="_blank">darcy@druid.net</a>></span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div class="HOEnZb"><div class="h5">On Sat, 9 Feb 2013 15:27:16 +0100<br>
Morten Engvoldsen <<a href="mailto:mortenengv@gmail.com">mortenengv@gmail.com</a>> wrote:<br>
> I Have saved my output in .doc file and want to format the output with<br>
><br>
> *************Start the File ************************<br>
><br>
> Some data here<br>
><br>
><br>
> *******************End of File*****************************<br>
><br>
> Can you let me know how can i do that using Python?<br>
<br>
</div></div>Seems pretty simple. Open the file, read it into a variable, print the<br>
header, print the data and then print the footer. Which part are you<br>
struggling with? Show us your code so far.<br>
<br>
Or is the issue with the .doc file? Is it a Word document or simple<br>
text?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
D'Arcy J.M. Cain <<a href="mailto:darcy@druid.net">darcy@druid.net</a>> | Democracy is three wolves<br>
<a href="http://www.druid.net/darcy/" target="_blank">http://www.druid.net/darcy/</a> | and a sheep voting on<br>
<a href="tel:%2B1%20416%20425%201212" value="+14164251212">+1 416 425 1212</a> (DoD#0082) (eNTP) | what's for dinner.<br>
IM: darcy@Vex.Net, VOIP: sip:darcy@Vex.Net<br>
</font></span></blockquote></div><br>