Re: Arrays, Got Me Confused

2007-04-13 Thread Michael Bentley
On Apr 13, 2007, at 7:04 AM, Robert Rawlins - Think Blue wrote: #!/usr/bin/python # Filename: Firewall.py class Firewall: def __init__(self): Self.FireArray = array(c) p = Firewall() print p Throws: Traceback (most recent call last): File "./firewall.p

Re: Arrays, Got Me Confused

2007-04-13 Thread rishi pathak
HI, You will have to import Numeric module Add from Numeric import * to the script For the second question: Suppose you wrote the code for your class in firewall.py and your main script is main.py Put the file firewall.py in the directory where you have main.py Then in main.py do : import firewall

Re: Arrays, Got Me Confused

2007-04-13 Thread Tim Golden
Michael Bentley wrote: > > On Apr 13, 2007, at 7:04 AM, Robert Rawlins - Think Blue wrote: >> #!/usr/bin/python >> >> # Filename: Firewall.py >> class Firewall: >>def __init__(self): >> >> Self.FireArray = array(c) >> >> p = Firewall() >> >> print p >> Throws: >> >> >> >> Tra

RE: Arrays, Got Me Confused

2007-04-13 Thread Robert Rawlins - Think Blue
: 13 April 2007 13:27 Cc: [EMAIL PROTECTED] Subject: Re: Arrays, Got Me Confused Michael Bentley wrote: > > On Apr 13, 2007, at 7:04 AM, Robert Rawlins - Think Blue wrote: >> #!/usr/bin/python >> >> # Filename: Firewall.py >> class Firewall: >>def __ini

Re: Arrays, Got Me Confused

2007-04-13 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > Hello Guys, > > Wider fragments of code don't really exists at this moment in time :-D this > is just a bit of a 'tester' class for me to get used to the methods. > Basically I'm trying to create a class that contains an array of MAC > address, these look somet

Re: Arrays, Got Me Confused

2007-04-13 Thread Richard Brodie
"Robert Rawlins - Think Blue" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Wider fragments of code don't really exists at this moment in time No but specifying the problem too narrowly tends to get you an unidiomatic solution. > Basically I'm trying to create a class that conta

RE: Arrays, Got Me Confused

2007-04-13 Thread Carsten Haese
On Fri, 2007-04-13 at 13:50 +0100, Robert Rawlins - Think Blue wrote: > Hello Guys, > > Wider fragments of code don't really exists at this moment in time :-D this > is just a bit of a 'tester' class for me to get used to the methods. > Basically I'm trying to create a class that contains an array

RE: Arrays, Got Me Confused

2007-04-13 Thread Robert Rawlins - Think Blue
olden Sent: 13 April 2007 14:03 Cc: [EMAIL PROTECTED] Subject: Re: Arrays, Got Me Confused Robert Rawlins - Think Blue wrote: > Hello Guys, > > Wider fragments of code don't really exists at this moment in time :-D this > is just a bit of a 'tester' class for me to get