Perhaps you can first try to enumerate basic blocks of a function then
trying to figure out which block your eip belongs to.
Check http://code.google.com/p/idapython/source/browse/trunk/examples/ex_gdl_qflow_chart.py
> --
> You received this message because you are subscribed to the Google Groups "idapython" group.
> To post to this group, send email to idap...@googlegroups.com.
> To unsubscribe from this group, send email to idapython+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/idapython?hl=en.
>
>