Re: [Tutor] file open error

2007-02-08 Thread John Fouhy
On 09/02/07, Jalil [EMAIL PROTECTED] wrote: Hi Jalil, Because you're doing this: from os import * It means that when you get to this line: fh=open(filename) You're actually calling os.open, which is lower-level than the standard open() and expects different arguments. Many people

Re: [Tutor] file open error

2007-02-08 Thread Bill Campbell
On Thu, Feb 08, 2007, Jalil wrote: 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'

Re: [Tutor] File open error

2006-09-04 Thread John Fouhy
On 05/09/06, Magnus Wirström [EMAIL PROTECTED] wrote: When i'm executing it i get this error (runtime) Traceback (most recent call last): File C:\python\boa\backup\backupwin.py, line 135, in OnStartaButton config = open(backup.conf, r) TypeError: an integer is required Looks like you're

Re: [Tutor] File open error

2006-09-04 Thread Danny Yoo
On Tue, 5 Sep 2006, John Fouhy wrote: When i'm executing it i get this error (runtime) Traceback (most recent call last): File C:\python\boa\backup\backupwin.py, line 135, in OnStartaButton config = open(backup.conf, r) TypeError: an integer is required I agree with John: this is