[BangPypers] Request for py program to insert space between two characters and saved as text?
praveen.python.plone at gmail.com
Wed Dec 9 13:05:51 CET 2009
But again the issue raise with file format if you save that file with ascii
format but you are reading it as unicode. Try to convert the file to unicode
before using it in python.
On Wed, Dec 9, 2009 at 5:23 PM, Praveen Kumar <
praveen.python.plone at gmail.com> wrote:
> Hi sorry as i did not find the attached file.
> Just write this script and save with space.py
> import sys
> print ' '.join([e for e in open(sys.argv, 'r').read()])*
> and run with the same command as Brijith told.
> On Wed, Dec 9, 2009 at 12:35 PM, BR!j!TH <brijithp at gmail.com> wrote:
>> try attached file....
>> usage: space.py input_text_file.txt
>> it will print the result in terminal...
>> To get the result in a file you can redirect it to file
>> space.py input_text_file.txt > out_put_text_file.txt
>> 2009/12/8 74yrs old <withblessings at gmail.com>
>> > For generating Kannada datafiles for tesseract-ocr .txt(not .doc) is
>> > my requirement is to automate one space between two characters in
>> > file. In MSword there is provision to make space between two characters
>> > under "Font" and can be saved as *.doc* But when tried to save as*
>> > all formatting will disappear. I could not understand how to do in
>> > Even tried copy and paste from doc to notepad but failed.
>> > In this context, I request you kindly for small python program - to
>> > automate
>> > make or insert space between two Kannada characters in the text file. (I
>> > have installed FFedora-11 also ubuntu9.04, WinXP)
>> > example: *F o r K a n n a d a d a t a f i l e s . t x t (n o t .d o
>> > i
>> > s u s e d, m y r e q u i r e m e n t i s t o h a v e o n e s p
>> a c
>> > e b e t w e e n
>> > t w o c h a r a c t e r s i n t h e t e x t.*
>> > *ಕ ನ್ನ ಡ ವ ನ್ನು ಕ ಲಿ ಯಿ ರೀ
>> > regards,
>> > -srianga(77yrsold)
>> > *
>> > _______________________________________________
>> > BangPypers mailing list
>> > BangPypers at python.org
>> > http://mail.python.org/mailman/listinfo/bangpypers
>> "Dream is not what you see in sleep
>> is the thing which does not let you sleep"
>> BangPypers mailing list
>> BangPypers at python.org
> Praveen Kumar
> +91 9739854134
More information about the BangPypers