We've been using Twill recently to do volume testing of a web site. Each simulated user is a separate CPython process running Twill. The processes are lightweight enough that a single ordinary PC with 2GB of RAM can easily simulate dozens of users.
Barry -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of C. Titus Brown Sent: Thursday, December 18, 2008 12:04 AM To: Macarse Cc: [email protected] Subject: Re: [twill] twill with threads On Tue, Dec 16, 2008 at 05:36:28PM -0200, Macarse wrote: -> Hi, I am doing a script that: -> - Gets a list of ips -> - Sets a threadpool -> - With twill it logins to the http -> - with urlib2 gets some html Hi, -> #login -> go(ip + '/login.asp') -> fv('1', 'user', 'user') -> fv('1', 'password', 'password') -> submit('3') -> -> req = urllib2.Request(ip + '/status.asp') -> response = urllib2.urlopen(req) -> statusPage = response.read() You could do this with twill easily enough -- just do browser = twill.commands.browser statusPage = browser.get_html() -> my question is: Is ok to use twill like that? -> Is it thread safe? ...however, unfortunately, the commands interface in twill is not thread safe, and mechanize (which twill uses to actually do anything :) may also not be threadsafe. best, --titus -- C. Titus Brown, [email protected] _______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill
_______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill
