[mythtv-users] "Miro Bridge" a new MythTV script enhancement

Nasa nasa01 at comcast.net
Mon Aug 10 08:13:07 UTC 2009


----- "Doug Vaughan" <r.d.vaughan at rogers.com> wrote:

> Nasa,
> 
> The test for the presence of the Imagemagick "convert" utility is
> fairly 
> simple. The return codes may be different on you distro then mine. I 
> made a very simple script that will display the out put and print a 
> return code when the script tries
> to execute a nonsense executable;e and then convert. 
> Clip out the script excluding the dashes and paste into a file named
> "test_convert_return_code.py" then make that file executable.
> 
> Next execute the "test_convert_return_code.py" from the command line
> and
> copy the output and email the reply in the mailing list. I will look
> at 
> the scripts output to determine what is wrong.
> 
> Thanks
> 
> -------------------------------------------------------
> 
> #!/usr/bin/python
> # -*- coding: UTF-8 -*-
> #  test_convert_return_code.py
> # Purpose: Used to verify the return values for a check that the 
> Imagemagick "convert" utility
> #          is installed and accessible
> #
> import sys, os, time, subprocess
> 
> cmd = "nothing -version"
> print "Return for 'nothing' value:(%d)" % subprocess.call(u'%s' % cmd,
> 
> shell=True)
> print
> 
> cmd = "convert -version"
> print "Return for 'convert' value:(%d)" % subprocess.call(u'%s' % cmd,
> 
> shell=True)
> 
> sys.exit()
> 
> -------------------------------------------------------
Thanks for looking into this Doug,

Here's the output:

./test_convert_return_code.py 
  File "./test_convert_return_code.py", line 5
    Imagemagick "convert" utility
                        ^
SyntaxError: invalid syntax

Nasa


> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


More information about the mythtv-users mailing list