>> In [4]:import array
>> In [5]:def f7(list):
>>    .5.:  return array.array('B', list).tostring()
>>    .5.:
>>
>> In [6]:f7([97, 98, 99])
>> Out[6]:'abc'




ugh the code it self is not generic python,  that was an example of how to
do this


my project is OCR
http://www.eternite.co.uk/gundam_clips/ocr.PNG

The letter I equals to "282" because it has 2 points on the y axis of the
first point, and 8 points on the y axis on the second, and then 2 on the
last one.


So the string would be translated into:

28201722030033330000004222400722240172206 and so on.

#####################


so what I am going to have is a string like above and what I 'll have is

a list of tuples, for instance   [a, 222] , [b,333]  and so forth

how do I write the fastest code to do this



optimization is immediately needed because the job is done as soon this
translation is complete.


so two bottle neck

image.getdata()  is a good solution, i haven't found a better one,

and the other bottle neck is this translation process.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to