
January 24th, 2004, 09:45 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Give this a wirl...
Code:
#!/usr/bin/env python
import os, urllib
choice = raw_input('Press (1) for news or (2) to visit the website ')
if choice == '1':
page = urllib.urlopen('http://www.google.com').read()
file('news.txt', 'w').write(page)
os.system('news.txt')
elif choice == '2':
os.system('explorer http://www.google.com/')
raw_input('Press ENTER to exit')
Mark.
|