Page 3 of 3 First 123
  • Jump to page:
    #31
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    UK
    Posts
    367
    Rep Power
    11
    YAY! It works!!!!! Finally. Thank u so much 4 all ur help!
  2. #32
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula

  4. #33
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    UK
    Posts
    367
    Rep Power
    11
    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
  6. #34
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula

  8. #35
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    UK
    Posts
    367
    Rep Power
    11
    ok il try thanks, thanks alot m8.
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo