473,411 Members | 2,230 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,411 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 1477
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.