|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
YAY! It works!!!!! Finally. Thank u so much 4 all ur help!
|
|
#32
|
||||
|
||||
|
No problem mate
would be what i hang around here for.. Anyway i dont know the website you're waning to use but how do you want to determin the current url??Mark. |
|
#33
|
||||
|
||||
|
like you type in "web" and it takes you to the website: http://www.geocities.com/hlh_halo
or you type in news andyou get the text file |
|
#34
|
||||
|
||||
|
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. |
|
#35
|
||||
|
||||
|
ok il try thanks, thanks alot m8.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Help a n00b!!!!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|