[Tutor] Reference a variable from a string whose value is the name of the variable

Peter Jessop pjlists at gmail.com
Tue Jun 6 10:31:52 CEST 2006


Kent

Thanks for your reply.
The structure is for sending form variables and values to a web server
with POST.
I am using urllib.urlencode which accepts a list or dictionary as argument.

The idea is to look for airline tickets.
The airline I buy from only lets me search by data but I want to
automate the process by POSTing the form for a range of dates so that
effectively I can search by price not by date.
I will then parse the returned HTML using HTMLParser or BeautifulSoup.

The form has a large number of variables and I just want to find a
tidy way to organise the information.

Peter


More information about the Tutor mailing list