Hey guys,

I have this simple code and i cant seem to get it to run.
here is the code.


from os import *
import re

hostname =raw_input("Host name : ") or '<unknown>'
mac_addr =input("Mac address : ")

filename='/etc/dhcpd.conf'
fh=open(filename)

m = re.match(hostname,fh.readlines())
if m!=None:
   m.group()


Here is the error I get when i try to run the code


monkeysee% python sys_wireless.py
Host name :
Mac address : 1234567
Traceback (most recent call last):
 File "sys_wireless.py", line 8, in ?
   fh=open("/etc/dhcpd.conf","r")
TypeError: an integer is required



I dont know what the issue is?

any hints ?
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to