[SciPy-user] Automatically retreiving Matrix Market files

Robert Kern rkern at ucsd.edu
Thu Nov 11 08:03:06 CST 2004


Nils Wagner wrote:

> url="ftp://math.nist.gov/pub/MatrixMarket2/SPARSKIT/fidap/fidap005.mtx.gz"
> fname =  mktemp(".mtx.gz")
> print "Downloading Matrix Market; this may take a minute..."
> urlretrieve(url, fname)
> A = io.mmread(gzip.open(fname))
> 
> Now it works fine. Thank you very much !
 >
> BTW, how can I remove the *.mtx.gz files in /tmp automatically ?

os.unlink(fname)

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the SciPy-user mailing list