Hey guys, here's my issue. Working with the iPort... one of the commands to send through the serial port is getplaystatus and 4 bytes are returned to describe the length of the song in milliseconds. An example is a song as 4:39 to it... the length returned from is an array

byte[] b = {0x00, 0x04, 0x67, 0x83};

So 4:39 in milliseconds is 279000.

Somehow those bytes need to equal 279000... and I've run out of ideas. Any help would be most appreciated. Thanks!

~Marty


Question: Write a python script that goes through the links on a page recursively
Answer: You could use HTML parser and specify the type of object you are searching for.

from HTMLParser import HTMLParser
import urllib2

class MyHTMLParser(HTMLParser):
    def handle_starttag(self, tag, attrs):
        if tag == 'a':
            for attr in attrs:
                if attr[0] == 'href':
                    print attr[1]

address='http://www.419scam.org/emails/'
html = urllib2.urlopen(address).read()
f = open('test.txt', 'wb')
f.write(html)
f.close()

parser = MyHTMLParser()
parser.feed(html)