Network Tools for Astronomy

The network tools paper is here. All the scripts in a tar file are here.

sftp.py This script does a simple sftp transfer of files from one machine to another. It assumes a no-password public key between the systems, or else it will prompt for a password. This type of script could, as a cron job, automatically backup disks in off-hours, or transfer files that pass a certain age, etc.
sftp_pexpect.py Similar to the sftp.py script, but using the much clearer pexpect module.
url_read.py This script reads a webpage with the option to strip out the HTML tags. The simplest retrieval of a webpage.
pymail.py This script is a cheap email client, but demonstrates the use of smtplib to send mail by scripts.
ned.py This script does a simple connect to NED's website to extract the coordinates of a galaxy.
ned_xml.py This script extracts the XML data from NED for the input galaxy name and prints the variable of interest. All the NED variables are listed here.
ned_cross_ids.py Same as above, but extracts all the cross IDs for a galaxy from NED.
ned_photometry.py Same as above, but extracts all photometry values for a galaxy from NED.
xml_archangel.py This is the XML processing module. It is best explored by interaction and reading its help file.
dss_read.py This script downloads FITS images from the DSS archive.
2mass_read.py Same as above, only for access to 2MASS images.
2mass_stitch.py This script accesses 2MASS image archive and stitchs together a 512x512 pixel image for the galaxy of interest.
mechanize_example.py This script is a simple example of the more powerful mechanzie module which allows a script to behave like a browser for interaction with even the most complicated webpage.

Added Note: check out selenium for deeper web programming