Python interface for librioutil

Emmanuel
2004-11-27
2013-04-23
  • Emmanuel
    Emmanuel
    2004-11-27

    I have to admit, pyrioutil has been using the same disk blocks for a while. But so far, I created a Rio class. This class sits on top of the librioutil bindings. That way, apps can access a rio like this:
    import rio # I need to change this to pyrioutil.rio
    r = rio.Rio()
    print r.getName()
    # and so on.

    It's quite easy to scroll through the files/tracks on the rio using the class. All you do is set the memory unit (the default is 0 - internal), and then loop through it like you would a dictionary:

    from rio import Rio
    rio = Rio()
    rio.setMemUnit(0) # Not really needed in this example.
    for file in rio:
         print file['title'], file['artist']

    I'm also working on a Python/GTK2 (with glade) interface.