datetime object from string

2006-02-06 Thread Douglas Douglas
Hi everybody.

I need to create a datetime object from a string like "20/01/2005 15:10:01". I
know the mxDateTime module can do this with the DateTimeFrom method, but I was
wondering if is possible to do this using only the standard library.

I read the datetime object reference but didn't find a method that does it
directly.

Is it possible to do it with the standard library?

Thanks all.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list


Identifying filled circles in a scanned image

2006-03-30 Thread Douglas Douglas
Hi everybody.

I have a paper form that I scan into an image. My user fills some circles in
this paper form using black ink. Every form has ten rows with five circles each
and the user fills only one circle for each row.

I was wondering if I could use the Python Imaging Library to process these
forms. I know the Image class is really powerful, but I can't think of a way of
how to locate wich circle was filled.

Could anybody please give me an advice on this?

Thanks.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Identifying filled circles in a scanned image

2006-03-30 Thread Douglas Douglas
First of all. Thanks Claudio and nikie for your fast answers.

What I want to do is process the forms automatically. Each circle match a
letter (like in a quiz). So if the user select option A in a row, he fills the
first circle. If he select option C in the next row, he fills the third circle
of that row. Get it?

What I want is to write a script that takes the images and say:
Form 1:
  Options Selected: A, B, C, A, B, C, A, D, E, A
Form 2:
  Options Selected: B, B, B, A, A, A, C, D, E, A
...

I've read the PIL tutorial. I've processed images before using PIL (basic stuff
though). I thought about using the difference method of the ImageChops module.
It almost worked. The problem is that when the scanner takes the pages it
doesn't put it in the same exact position in its bed. There's not a lot of
difference, but there's a little.

I also thought about drawing references in the forms (like a line or an X) I
could look for.

I like to hear your comments now that I explained a little more.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list