![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 2
Rep Power: 0
![]() |
Hi,
I want to create a python client, that will receive and post messages to an HTML Webserver. I have found several articles on how to read html data, which i have been able to do. but i cant find any resources on how to trigger events for html, like pushing buttons. Can anyone help me out? ![]() |
|
|
|
|
|
#2 |
|
Professional Programmer
|
If I'm not mistaken, you'll have to implement these python scripts on the server's side -- the side of a server that has mod_python or so running, moreover. Then you'll use an html/server module with python to print out the HTML data and forms, as well as process the data that the user sends.
However, I'm not too familiar with python, and even less so with python&html.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Aug 2005
Posts: 2
Rep Power: 0
![]() |
Thanks but thats not what I want to do. Actually I have a networking device which is configured through its web interface. I want to automate the configuration. So I need to write a python script that would automatically load the config file to the network device through its webinterface.
So I need some python library that sends data back to the webinterface as well as retrieving it. |
|
|
|
|
|
#4 |
|
Expert Programmer
|
Check out Python CGI. Comes as a built-in module so you don't ave to download anything else.
|
|
|
|
|
|
#5 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
You either want urllib or urllib2, depending on whether or not your web interface, like mine, uses basic HTTP authentication for the login box (do you get a popup that asks you for your username or password) or not. Tell me that and i'll point you in the right direction |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|