473,287 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Script to Download Ubuntu Gutsy ASAP

I thought I would post the source to a program that I made that will
download the http://ubuntu.media.mit.edu/ubuntu-releases/gutsy/
as soon as its posted.

It checks the site every 10 min time.sleep(600)

This is mostly untested so I would appreciate comments, and if you use
it, post that too! :)
<code>

import time
import urllib

mysock = urllib.urlopen("http://ubuntu.media.mit.edu/ubuntu-releases/
gutsy/ubunt
u-7.10-desktop-i386.iso")
#print mysock
while 1:
image = mysock.read()
if image[0:1]!='<':
oFile = open(r"image.iso",'wb')
oFile.write(image)
oFile.close
break
exit
print "Wait ", time.localtime()
time.sleep(600)
</code>

enjoy,
Daniel Folkes
da*******@gmail.com
http://danfolkes.com

Oct 18 '07 #1
1 1462
On 10/18/07, danfolkes <da*******@gmail.comwrote:
I thought I would post the source to a program that I made that will
download the http://ubuntu.media.mit.edu/ubuntu-releases/gutsy/
as soon as its posted.

It checks the site every 10 min time.sleep(600)

This is mostly untested so I would appreciate comments, and if you use
it, post that too! :)
<code>

import time
import urllib

mysock = urllib.urlopen("http://ubuntu.media.mit.edu/ubuntu-releases/
gutsy/ubunt
u-7.10-desktop-i386.iso")
#print mysock
while 1:
image = mysock.read()
if image[0:1]!='<':
oFile = open(r"image.iso",'wb')
oFile.write(image)
oFile.close
break
exit
print "Wait ", time.localtime()
time.sleep(600)
</code>

enjoy,
Please, don't do it. Use the torrent, Luke.
Also, use the HTTP error code - while the file is not at the server,
you will receive a 404, I think.

--
http://www.advogato.org/person/eopadoan/
Bookmarks: http://del.icio.us/edcrypt
Oct 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Martin Maney | last post by:
Apologies if this isn't news here - I've been too busy this last week or so for even skimming the traffic here, in part because I've been messing around with Ubuntu's preview release on a spare...
5
by: Kim Forbes | last post by:
Hi, I realize my first problem is that I'm using browser detection and not feature detection. Maybe someone can help me understand feature detection. This script works in every browser that I...
2
by: SPE - Stani's Python Editor | last post by:
Hi, I'm playing around with the latest (soon to be released) SPE on Ubuntu. This probably will increase the quality of SPE on Ubuntu and Linux/GTK in general. I already made some patches, but I...
2
by: Danny Boy | last post by:
Hi, "Snif" is an excellent little script to index files and directories. It's just one single file, and the advantage is that you merely drop it into the directory you want to index, point a...
0
by: Norbert Munkel | last post by:
Just like to mention that at least ubuntu 7.10 (gutsy) comes with a broken db2 updater. If you have already installed DB2 9.0 using the ubuntu packages the updater will break your running...
2
by: Dr. Colombes | last post by:
Is there an easy scientific graphics (plotting) package for Python 2.5.1 running on Ubuntu Linux 7.1 ("Gutsy Gibbon")? A few years ago I used PyLab (a MatLab-like plotting module for Python) on...
11
by: Ix | last post by:
It seems not remember how to compile with gcc a C program in linux (ubuntu) how i have to compile this programme? It seems gcc doesn't find stdio.h.. why is all antiintuitive? Thank you and...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.