starting with Python on OpenSuse11.3

hi community,

what is needed to start with Python on OpenSuse 11.3?

lin :slight_smile:

Hello dear folks - hello @ all.

i wanted to run the following code - but with no luck at all?

import urllib
import urlparse
import re

url = ""
html = urllib.urlopen(url).read()
for lk, capname, name in re.findall('<a href="(/~.*?/)"><b>(.*?)</b></a><br/><small>(.*?)</small>', html):
    alk = urlparse.urljoin(url, lk)

    data = { 'url':alk, 'name':name, 'cname':capname }

    phtml = urllib.urlopen(alk).read()
    memail ='<a href="mailto:(.*?)">', phtml)
    if memail:
        data'email'] =

    print data

i get the following output:

suse-linux:/usr/perl # python
Traceback (most recent call last):
File “”, line 6, in <module>
html = urllib.urlopen(url).read()
File “/usr/lib/python2.6/”, line 86, in urlopen
File “/usr/lib/python2.6/”, line 205, in open
return getattr(self, name)(url)
File “/usr/lib/python2.6/”, line 467, in open_file
return self.open_local_file(url)
File “/usr/lib/python2.6/”, line 481, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: ‘’
suse-linux:/usr/perl #

hmm - i look forward to hear from you


The script is working here without any Python-specific modifications to the system. Maybe you messed up something in your box… what did you do (before writing and running that script) ?