If I follow the exmple I have this type of error:
File ./RNA_prova.py, line 73, in run
for line in p1.stdout():
TypeError: 'NoneType' object is not callable
This is the class I use:
def run(cmd,pi):
import subprocess
import time
import logging
Sorry to bother you all with what you might consider trivia, but
someone
in my course forum posted this statement:
I have never seen or heard of real uses of recursion except for
proving
cleverness,
so I thought I would ask you all if that is true. Is it really not
used
in real world
On 09/10/2014 11:20 AM, jarod...@libero.it wrote:
If I follow the exmple I have this type of error:
File ./RNA_prova.py, line 73, in run
for line in p1.stdout():
TypeError: 'NoneType' object is not callable
You have at least two errors in your script below:
This time you're not piping
On Wed, Sep 10, 2014 at 11:20:38AM +0200, jarod...@libero.it wrote:
If I follow the exmple I have this type of error:
File ./RNA_prova.py, line 73, in run
for line in p1.stdout():
TypeError: 'NoneType' object is not callable
Somehow you have p1.stdout set to None. You can confirm this by
Op 10-09-14 om 01:30 schreef Alan Gauld:
Its not, as others have already said, you set the tab
key to insert spaces. Of course you usually have to delete
those spaces manually - but hopefully that's a relatively
rare event - and there are usually short cuts to delete
to start of line.!
Any code which walks a tree is almost certainly going to be using
recursion. This is everything from a chess game analyser, to image
processing software, to your browser when it's rendering a web page and
much more in-between.
For the comment about Chess, see minmax for a concrete example: