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

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

        def format_mpc_output(raw):
    return [line for line in raw.split('\n') if line]
        


src/m/p/mpdc-HEAD/mpdc/libs/parser.py   mpdc(Download)
 
from mpdc.initialize import mpd, collectionsmanager, lastfm, enable_command
from mpdc.libs.utils import format_mpc_output, warning, OrderedSet
 
 
                output = subprocess.check_output(collection['command'],
                                                 shell=True)
                p[0] |= OrderedSet(format_mpc_output(output.decode()))
            except subprocess.CalledProcessError:
                warning('Error while executing `command` in collection [{}]'.

src/m/p/mpdc-HEAD/mpdc/libs/mpdhelper.py   mpdc(Download)
 
from mpdc.initialize import cache
from mpdc.libs.utils import format_mpc_output, OrderedSet
 
 
    def get_playlist_songs(self):
        output = check_output(self.mpc_c + ['-f', '%file%', 'playlist'])
        return format_mpc_output(output.decode())
 
    def get_playlist_positions(self):
        positions = collections.defaultdict(list)
        output = check_output(self.mpc_c + ['-f', '%file% %position%',
                                            'playlist'])
        for line in format_mpc_output(output.decode()):
    def list_artists(self):
        output = check_output(self.mpc_c + ['list', 'artist'])
        return format_mpc_output(output.decode())
 
    def list_albums(self):
        else:
            output = check_output(self.mpc_c + ['search', filtername, pattern])
            return format_mpc_output(output.decode())
 
    def search_multiple(self, **filters):