lllllIllIlllI 178 Veteran Poster

yeah the soup module looks a bit difficult. I might continue trying to find a way to change it in its string format. Oh and the URL is http://www.bom.gov.au/products/IDN10060.shtml#HUN
Its a local weather forcast for the HUNTER i am trying to extract

lllllIllIlllI 178 Veteran Poster

Hi
I have the source of a webpage that tells the weather and i want to extract the data and my only hurdle left to jump is to remove all the formatting HTML marks inside and including the <> bracket. I have the web page source stored as a string so maybe the sting module. I dont know.

lllllIllIlllI 178 Veteran Poster

Ah i think i have got it!
one last question. When do you need (self) and when is it not needed?

lllllIllIlllI 178 Veteran Poster

How about a Noughts and Crosses game with AI so when the computer can it will win and it will block the player from winning if it can.
Try make it so there are difficulty setting ranging from easy to beat to nearly impossible.
If you want you could add a tournament kind of thing by having 'best of three' rounds

lllllIllIlllI 178 Veteran Poster

HI
I was having a look into classes and i noticed i saw a lot of things like

class fruitcake(object):
    pass

my question is what is the point of the "object" being in the class arguments as it is a Built In Function and i couldn't work out what putting it there did

lllllIllIlllI 178 Veteran Poster

Yeah that webbrowser module is great!
i ended up using:

import webbrowser
webbrowser.open('www.google.com')

thanks everyone

lllllIllIlllI 178 Veteran Poster

Hi
I was making a program that tried to open firefox like this:

exec file('C:\\Program Files\\Mozilla Firefox\\firefox.exe')

but i get an error

exec file('C:\\Program Files\\Mozilla Firefox\\firefox.exe')
  File "C:\Program Files\Mozilla Firefox\firefox.exe", line 1
SyntaxError: Non-ASCII character '\x90' in file C:\Program Files\Mozilla Firefox\firefox.exe on line 1, but no encoding declared; see [url]http://www.python.org/peps/pep-0263.html[/url] for details (firefox.exe, line 1)

does anyone know how to open firefox and perhaps also to direct it so a predetermined website

lllllIllIlllI 178 Veteran Poster

Hi
I have been looking around for some good tutorials but i havent been able to find
any especially for networking. i was wondering if anyone in the community could
help.
thanks

lllllIllIlllI 178 Veteran Poster

Hi
i was wondering the best way to time how long a function/program takes
i cant work out how to do it. I tried fiddling with the time module yet i keep
doing the wrong things.

lllllIllIlllI 178 Veteran Poster

Thanks!!
That is exactly what i was looking for!
great ideas and it works really well.
Problem Solved!

lllllIllIlllI 178 Veteran Poster

That dosent really solve my problem

# get the character of a key pressed (no return key needed)
# works only in the command window and with Windows OS
from msvcrt import getch

print "press a char key (escape key to exit)"
z=0
x=0
while True:
    x=x+1
    z = getch()
    print ord(z)
    # escape key to exit
    if ord(z) == 27:
        break
    print z,x

what i want is x to keep counting wether a button has been pressed or not and when a button is pressed it shows how high x is. for example the first time you press enter x might print as 12 the next at 124 and so on but inbetween buttons being pressed nothing is printed

lllllIllIlllI 178 Veteran Poster

Hi
My question is: i made a program that counts up and up continuously in the background but i want it to print what number it is up to when you press a certain button such as ENTER. I have tried using raw_inputs() but all that happens is it keeps waiting every time for an input rather then just continuing counting like it is meant to. Any help would be greatly appreciated.