Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:o5hnbq$q36$1...@blaine.gmane.org... "Frank Millman" wrote in message news:o5hlh4$1sb$1...@blaine.gmane.org... > > If you are saying - > for item in list: > print(item) > > you can say instead - > for item in list: > print(str(item)) >

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:o5hlh4$1sb$1...@blaine.gmane.org... If you are saying - for item in list: print(item) you can say instead - for item in list: print(str(item)) This is not correct, sorry. print(item) will automatically print the string representat

Sockets: IPPROTO_IP not supported

2017-01-15 Thread Peter Pearson
Trying to sniff Ethernet packets, I do this: s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) but it results in this: $ sudo python3 sniff_survey.py Traceback (most recent call last): File "sniff_survey.py", line 118, in s = socket.socket(socket.A

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"David D" wrote in message news:4f0680eb-2678-4ea2-b622-a6cd5a19e...@googlegroups.com... I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run > the code, it

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Erik
Hi, On 15/01/17 19:58, David D wrote: I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run the code, it does exactly what I want, it returns the __str__ informa

Re: Problem while building Python 3.6 from source.

2017-01-15 Thread Chris Angelico
On Mon, Jan 16, 2017 at 7:55 AM, Michael S wrote: > @ChrisA: I tried your advice and think it worked. So, I just used $ > ./configure and then $ make. Then I was not sure, whether it had > worked so I used $ make test and got a fairly long result. At the end > there was a line like "test successfu

nfldb API

2017-01-15 Thread Thufir Hawat
I'm looking at nfldb: pip install --user nfldb which is on github: https://github.com/BurntSushi/nfldb/wiki/More-examples Coming at this from Java, how would I hook into nfldb with Java? Or, perhaps, run the code in Jython? I'm sure there's a general solution or approach, would appreciate

Re: Problem while building Python 3.6 from source.

2017-01-15 Thread Michael S
Thanks Thomas and ChrisA! @Thomas: I don't know.. Unfortunately I am not as skilled as to be able to find out.. @ChrisA: I tried your advice and think it worked. So, I just used $ ./configure and then $ make. Then I was not sure, whether it had worked so I used $ make test and got a fairly long r

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Chris Angelico
On Mon, Jan 16, 2017 at 6:58 AM, David D wrote: > I am creating a parent class and a child class. I am inheriting from the > parent with an additional attribute in the child class. I am using __str__ > to return the information. When I run the code, it does exactly what I want, > it returns

working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread David D
I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run the code, it does exactly what I want, it returns the __str__ information. This all works great. BUT 1)