[Stackless] stacklesssocket mechanize help

Costantino Giuliodori costantino.giuliodori at gmail.com
Sat Aug 4 20:04:55 CEST 2007


Hi,
I'm a newbie and I've tried to use mechanize with stacklesssocket, but
it don't worked.

Is possible to use mechanize by monkey-patch?
Can anyone help me?

This is the code:

import sys
import stackless
import stacklesssocket

sys.modules["socket"] = stacklesssocket

from mechanize import Browser

def openurl( url ):
  br = Browser()
  print "start url : " + url
  br.open(url)
  print br.title()
  br.close()

stackless.tasklet(openurl)("http://www.altavista.com")
stackless.tasklet(openurl)("http://www.yahoo.com")
stackless.tasklet(openurl)("http://www.python.org")
stackless.tasklet(openurl)("http://www.stackless.com")
stackless.tasklet(openurl)("http://www.google.it")
stackless.tasklet(openurl)("http://www.google.com")
stackless.tasklet(openurl)("http://www.google.jp")
stackless.tasklet(openurl)("http://www.google.ch")
stackless.run()

while 1 : pass

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://stackless.com/cgi-bin/mailman/listinfo/stackless



More information about the Stackless mailing list