Problem with python script in windows

Dave Hansen iddw at hotmail.com
Thu May 8 14:26:23 EDT 2003


On 8 May 2003 11:01:48 -0700, bunger00 at grm.hia.no (Bunger) wrote:

>Thanks for the help so far, but now I've got new problems.   Please
>help me, what can I do to get this to work?
>
>bjorn
>
>this is the error messeges I get

These tell you almost everything you need to know...

>
>Encoding 'ready.avi'
>Traceback (most recent call last):
>  File "C:\Documents and Settings\Bjorn\Desktop\test.py", line 47, in
>?
>    main(sys.argv[1:])
>  File "C:\Documents and Settings\Bjorn\Desktop\test.py", line 40, in
>main
>    encode(file)
>  File "C:\Documents and Settings\Bjorn\Desktop\test.py", line 27, in
>encode
>    execPip.wait()
>AttributeError: 'tuple' object has no attribute 'wait'

This last one is the most important.  It says "execPip is a tuple, and
tuples don't have any attribute named "wait." 

So execPip isn't what you thought it was.  Why not?  Let's look at how
you made it...

[...]

>	execPip = popen2.popen3(execStr)

Looking at my documentation, I see that popen2.popen3 is a function
that returns a tuple.  So the error message is correct.  If you read
the documentation a little closer, you'll see the mistake you made.

FWIW, I would consider this a poor design (of popen2).  No two symbols
should be spelled so similarly, function so simililarly, and yet give
such different results.  IMHO, of course.

Regards,

                               -=Dave
-- 
Change is inevitable, progress is not.




More information about the Python-list mailing list