Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 18th, 2005, 12:38 AM   #1
sabz
Newbie
 
Join Date: Aug 2005
Posts: 2
Rep Power: 0 sabz is on a distinguished road
Exclamation Python Client for an HTML Server

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?
sabz is offline   Reply With Quote
Old Aug 18th, 2005, 1:13 AM   #2
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
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;}
iignotus is offline   Reply With Quote
Old Aug 18th, 2005, 1:30 AM   #3
sabz
Newbie
 
Join Date: Aug 2005
Posts: 2
Rep Power: 0 sabz is on a distinguished road
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.
sabz is offline   Reply With Quote
Old Aug 18th, 2005, 6:24 AM   #4
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 707
Rep Power: 4 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
Check out Python CGI. Comes as a built-in module so you don't ave to download anything else.
thechristelegacy is offline   Reply With Quote
Old Aug 18th, 2005, 7:49 AM   #5
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
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.
Indeed. You don't want Python CGI related stuff or mod_python, people did not understand your question very well. You want to interact with the web interface from your script, so you want client-side stuff.
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
Cerulean is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:40 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC