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.pl...@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[1], 'r').read()])*
>
> and run with the same command as Brijith told.
> Thanks
>
> Praveen
>
>
> On Wed, Dec 9, 2009 at 12:35 PM, BR!j!TH <briji...@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
>> example:
>> space.py input_text_file.txt > out_put_text_file.txt
>>
>>
>> 2009/12/8 74yrs old <withblessi...@gmail.com>
>>
>> > For generating Kannada datafiles for tesseract-ocr .txt(not .doc) is
>> used,
>> > my requirement is to automate one space between two characters in
>> Notepad
>> > 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*
>> .txt*
>> > all formatting will disappear. I could not understand how to do in
>> notepad.
>> > 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
>> c)
>> >  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@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@python.org
>> http://mail.python.org/mailman/listinfo/bangpypers
>>
>>
>
>
> --
> Praveen Kumar
> +91 9739854134
> http://praveensunsetpoint.wordpress.com
> Bangalore
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to