Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

save resouce from url to local system using python

 
prasad ap
Greenhorn
Posts: 5
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i am completely new for python, i need one program which access the url and save the particular file to local system. the url like url=http://www.tizag.com/pics/example.swf. I want to save that shock wave file to local drive using python.
Not only swf file, pdf or ppt files also ok...

please help me...

Prasad
 
chris webster
Bartender
Pie
Posts: 2358
31
Linux Oracle Postgres Database Python Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Python 3 urllib module, which provides various functions to allow you to read stuff via URLs.
 
Pat Farrell
Rancher
Posts: 4660
5
Linux Mac OS X VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris' suggestion will work, but have you considered using wget or curl? They do what you want, are well documented and tested. No need to reinvent the wheel.
 
chris webster
Bartender
Pie
Posts: 2358
31
Linux Oracle Postgres Database Python Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prasad ap,
Your post was moved to a new topic. See below.
 
chris webster
Bartender
Pie
Posts: 2358
31
Linux Oracle Postgres Database Python Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now we're talking about converting between file formats, I don't think this is really a Python question any more, so I thought you might get more help in a more general forum (General Computing).
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic