screen scraping

2009-06-01 Thread ubuntu . exe
Hello,
does anybody have a simple tutorial for screen scrapping?

I want to extract IP addresses from particular web page, reading
documentation for a couple of days and writing some really simple
scripts, but cant get it to work.

Did anybody see any manual explicittly for screen scraping?

Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


strange thing after call PyObject_CallMethod

2009-01-03 Thread Exe

Hello everybody!

I'm in trouble. This code shows that ob_refcnt increased by python
if "on_recv" method throws exception. This occurs only if base C-class  
subclassed

in python code.
==
my_old_refcnt = Py_REFCNT(self);
py_result = PyObject_CallMethod(self, "on_recv", "(y#)", recvbuf, result);
my_new_refcnt = Py_REFCNT(self);

log_debug("refcnt before call %d", my_old_refcnt);
log_debug("after call: %d\n", my_new_refcnt);
==


Output:
==
tcpconn.c: refcnt before call 1
tcpconn.c: after call: 2
==

If PyObject_CallMethod returns success(any non-NULL value) anything okay.
Tested on Python 3.1a0 (py3k:68145M, Jan  2 2009, 20:51:28).

Why this happenning and who makes Py_INCREF(self)?


PS garbage collector knows about this so on exit
PyGC_Collect deletes instance.

--
//wbr
Kandalintsev Alexandre
--
http://mail.python.org/mailman/listinfo/python-list