Modify HTML data

2005-11-05 Thread Swarna
Hi all,

Can anyone help me with this ?

I am using scp in python to copy a html file on remote server, to my
local machine. Now, i need to update this html file in my local machine
( by adding a new Hyperlink to the existing table od hyperlinks ) and
copy it back (overwriting the old copy ) to the remote server.

Thanks, for your time !
Swarna.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Modify HTML data

2005-11-06 Thread Swarna

Peter Hansen wrote:
> Swarna wrote:
> > I am using scp in python to copy a html file on remote server, to my
> > local machine. Now, i need to update this html file in my local machine
> > ( by adding a new Hyperlink to the existing table od hyperlinks ) and
> > copy it back (overwriting the old copy ) to the remote server.
>
> If you are using scp to copy the file from the remote server in the
> first place, what's stopping you from using scp to copy it back?

I might be vague in expressing my problem.the problem is not with
scp. What i need is how to modify the html file in my local machine
that i got from remote server.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Modify HTML data

2005-11-06 Thread Swarna

Peter Hansen wrote:
> Swarna wrote:
> > Peter Hansen wrote:
> >>Swarna wrote:
> >>>I am using scp in python to copy a html file on remote server, to my
> >>>local machine. Now, i need to update this html file in my local machine
> >>>( by adding a new Hyperlink to the existing table od hyperlinks ) and
> >>>copy it back (overwriting the old copy ) to the remote server.
> >>
> >>If you are using scp to copy the file from the remote server in the
> >>first place, what's stopping you from using scp to copy it back?
> >
> > I might be vague in expressing my problem.the problem is not with
> > scp. What i need is how to modify the html file in my local machine
> > that i got from remote server.
>
> Ah, so all that stuff about scp was just to distract us from the real
> problem? 
>
> Okay, so Lorenzo's advice is fine: grab an HTML parser and use that to
> figure out where things are.  Or if the problem is defined simply
> enough, you could use a regular expression (re module).  BeautifulSoup
> is often recommended when the HTML is not necessarily very clean...
>
> Personally, I'd start with an re and move on from there only if that was
> for some reason not sufficient.
>
> -Peter

  heyi got it worked with simple file object.Thanks, for
all your suggestions !

-- 
http://mail.python.org/mailman/listinfo/python-list


how to identify a particular directory / file on remote machine

2005-11-09 Thread Swarna
Hi all,

I am trying to find out whether a particular directory is present on a
remote machine or not from my local Python script in Linux . Can anyone
help me with the command that i need to issue to os.system in my python
script to acheive this?

Thanks, for all your time !

-- 
http://mail.python.org/mailman/listinfo/python-list


connect to a remote web server & upload data from Python using ssh and scp

2005-11-04 Thread Swarna Pulavarty
Hi all,
 
I need to upload data ( text & image data ) to a remote web server from python. I came to know that i could do it using ssh and scp.but am not sure of how to do it.
 
 I don't want to use CGI for that .
 
Can anyone help mehow to do it, and where i can get a good tutorial for doing thisI surfed the net..but could'nt find a good doc for this..
 
Thanks, for your time !....
Swarna.
		 
Enjoy this Diwali with Y! India Click here-- 
http://mail.python.org/mailman/listinfo/python-list

generating a click event without actually clicking the button

2005-11-04 Thread Swarna Pulavarty
Hi all,
 
I need to retreive data from a website. For this, the user needs to click a button to get the actual data. 
 
How can i do this programatically in python, wihtout any user involvement, generating a button click event and retreiving the data.
 
Any help is appreciated !
Swarna.
 
 
		 
Enjoy this Diwali with Y! India Click here-- 
http://mail.python.org/mailman/listinfo/python-list

retrieve data using FTP in Python

2005-09-13 Thread swarna pulavarty
Hi all, 
 
I am new to this Python group and to Python . I need to retrieve data from an arbitrary URL and save it to a file.
Can anyone tell me how to retrieve "any" data using FTP modules in Python ? And also, Can you suggest me some books and online references to get familiar with Python and especially FTP modules in Python ? 
 
Your help is appreciated !
 
Swarna.
		 
Yahoo! India Matrimony: Find your partner now.-- 
http://mail.python.org/mailman/listinfo/python-list

retrieve data using FTP in Python

2005-09-14 Thread swarna pulavarty

Hi all, 
 
I am new to this Python group and to Python . I need to retrieve data from an arbitrary URL and save it to a file.
Can anyone tell me how to retrieve "any" data using FTP modules in Python ? And also, Can you suggest me some books and online references to get familiar with Python and especially FTP modules in Python ? 
 
Your help is appreciated !
 
Swarna.
		 
Yahoo! India Matrimony: Find your partner now.-- 
http://mail.python.org/mailman/listinfo/python-list

How to Handle exceptions using OpenerDirector

2005-09-20 Thread swarna pulavarty




Hi all, 
 
 I am trying to figure out a way to handle exceptions for error code 4xx , and 5xx 's . I came to know that these can be handled using OpenerDirector class and urllib2 module in Python. I could'nt find the right syntax or examples of how to use these Handlers.
 
Any help is greatly appreciated !
 
 
Swarna.



		 
Yahoo! India Matrimony: Find your partner now.-- 
http://mail.python.org/mailman/listinfo/python-list