Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def video(video, target, profile, info):
    cmd = video_cmd(video, target, profile, info)
    profile, format = profile.split('.')
    #r = run_command(cmd, -1)
    p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    try:
        p.wait()
        r = p.returncode
        if format == 'mp4':
            cmd = [command('qt-faststart'), "%s.mp4" % target, target]
            p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
                                      stdout=open('/dev/null', 'w'),
                                      stderr=subprocess.STDOUT)
            p.communicate()
            os.unlink("%s.mp4" % target)
        print 'Input:\t', video
        print 'Output:\t', target
    except KeyboardInterrupt:
        p.kill()
        r = 1
        if os.path.exists(target):
            print "\n\ncleanup unfinished encoding:\nremoving", target
            print "\n"
            os.unlink(target)
        if format == 'mp4' and os.path.exists("%s.mp4" % target):
            os.unlink("%s.mp4" % target)
        sys.exit(1)
    return r == 0
        


src/p/a/pandora_client-0.2.183/pandora_client/__init__.py   pandora_client(Download)
        if not os.path.exists(media_f) \
            or os.stat(media_f).st_size == 0:
            extract.video(filename, media_f, profile, info)
    else:
        print info