How to call wget by python ?

rurpy at yahoo.com rurpy at yahoo.com
Thu Jan 10 06:01:24 CET 2013


On Wednesday, January 9, 2013 7:11:34 PM UTC-7, iMath wrote:
> can you  give me an example code ?

For running any system command from Python, you can use the 
subprocess module:
  http://docs.python.org/3/library/subprocess.html#module-subprocess

To run "wget -p -k http://python.org" from Python you could
do something like this:

  import subprocess
  subprocess.call (['wget', '-p', '-k', 'http://python.org'])





More information about the Python-list mailing list