I'm an absolute beginner using IDLE (Python 2.6.4) to learn the basics. I recently found a Python program that I want to run but it throws an error although the code looks fine (i.e all modules exist):
from css.parse import parse
data = """
em {
padding: 2px;
margin: 1em;
border-width: medium;
border-style: dashed;
line-height: 2.4em;
}
p { color: red; font-size: 12pt }
p:first-letter { color: green; font-size: 200% }
p:first-line { color: blue }"""
for rule in parse(data):
print rule
for decl in parse(data)[0]:
print decl
Error:
ImportError: No module named parse
How do I fix this? I'm using Snow Leopard.
Edit: I guess its a PATH issue, where should I place the modules, which directory?