473,625 Members | 3,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.mi t.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.is o",'wb')
oFile.write(ima ge)
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 1495
On 10/18/07, danfolkes <da*******@gmai l.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.mi t.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.is o",'wb')
oFile.write(ima ge)
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
2479
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 machine... and, of course, spending time on their very busy mailing list. :-) I didn't find any mention of Ubuntu in a quick scan of recent messages, so... Ubuntu is a Linux distribution that starts with the breadth of Debian and adds regular...
5
2097
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 need it too, except Safari 1.0.2 Here is the script. Please tell me if there is any more information I can give you.
2
2644
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 would like to get in contact with SPE users on Ubuntu. The version of SPE which is now available on Ubuntu now is quite deprecated. I adapted SPE such that it can ran out of the box of an archive (zip or tar.gz). This has the advantage that...
2
2510
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 browser to the script and you're done. But to me, the simplicity is a DISadvantage since I need to index directories that are located down in the site hierarcy, and to which the users won't have direct access.
0
1353
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 instance as it replaces 9.0 with 9.5, breaking the old instance "db2inst1" and introducing a second (running) instance "db2inst2". Here is the link to the full bug description including a first short workaround to possibly get your data back without...
2
2688
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 a Windows machine, but I don't know if there is a similar easy-to-install-and-use Python 2.5.1-compatible graphics package for Ubuntu Linux 7.1? Thanks for any suggestions.
11
2935
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 Good Morning ---------------------------------------------------
3
5176
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
47439
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 on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8356
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.