[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Python usable in plugins?
From: Richard Jones <rjones () ekit-inc ! com>
Date: 2002-04-22 3:06:26
[Download RAW message or body]
I'm just getting into python programming in KDE (having done some PyQt
tinkering and quite liked it).
I know almost nothing about how plugins work in Noatun (the C++ object file
loading and other ickier parts like that) - and I was wondering if there was
any way to use a python to write a plugin? I've done a very, very small
amount of C++ programming, and frankly I really don't want to if I don't have
to.
Richard
ps. just to actually have some value in this post, attached is a trivial
script that re-sorts an XML playlist ;)
["sort_playlist" (text/plain)]
#! /usr/bin/env python
import sys, re
print '<!DOCTYPE XMLPlaylist>'
print '<playlist client="noatun" version="1.0" >'
lre = re.compile('\s*<item local="(.*?)" url="(.*?)" enabled="(.*?)" />', re.I)
l = []
for line in open(sys.argv[1]).readlines():
m = lre.match(line)
if m: l.append(m.group(1, 2, 3))
l.sort()
for entry in l: print ' <item local="%s" url="%s" enabled="%s" />'%entry
print '</playlist>'
_______________________________________________
kde-multimedia mailing list
kde-multimedia@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic