[ricardo@conysis.com: Re: [PyKDE] [ANN] New repository for non-official Debian packages]
I hope Ricardo doesn't mind me forwarding this to the list, but I in fact thought I had kept it on list from the first (stupid mutt, I much prefer KMail). Just wanted to make a point that we should thank *everyone* who helps out, not just Jim and Phil (whom get an almost constant stream of fan mail :-). I.e., if you are unfortunate enough to be running an rpm based system, maybe you should be sending a shout-out to Hans... - Forwarded message from Ricardo Javier Cardenes <[EMAIL PROTECTED]> - Envelope-to: [EMAIL PROTECTED] From: Ricardo Javier Cardenes <[EMAIL PROTECTED]> To: David Bishop <[EMAIL PROTECTED]> Subject: Re: [PyKDE] [ANN] New repository for non-official Debian packages On Sun, Nov 24, 2002 at 12:15:56PM -0700, David Bishop wrote: > > Hey, just wanted to take a minute and say thanks for all your work > making debian packages for this stuff. I was thinking just yesterday > that I wanted to try out eric, but then I thought "Heck, Ricardo will > have packages pretty soon, no need to compile it myself", and then I > thought "Daggone, Ricardo rocks!", and then I thought "You know, self, I > bet Ricardo doesn't hear that nearly often enough". > > So, here I am :-) Thanks again, it is very much appreciated. Have a > great weekend! Hey! :-) It's not too often that someone greets me about my work on Debian :-) Thank you very much :-)) - End forwarded message - ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: Packages for Eric, the Python IDE
This is a "works great for me" email. The packages, that is. I am having some weirdness with the editor itself, but I'm not sure if it's me or it :-) If I can nail down a solid bug, I'll make sure to report it, tho. Tanks! -Me On Tue, Nov 26, 2002 at 06:25:13PM +, Ricardo Javier Cardenes Medina wrote: > > I've uploaded packages for Eric. "eric" only contains the wrappers (eric3, > qtunittest, helpviewer), and depends on another package (python2.2-eric), > which actually installs all the modules. > > I'll probably end up providing a conflicting "python2.1-eric" package, > because I don't see the benefits of having both installed at the same > time. If someone really wants this (both packages at same time), please, > let me know why :-), and I'll try to provide it. > > ___ > PyKDE mailing list[EMAIL PROTECTED] > http://mats.gmd.de/mailman/listinfo/pykde ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] brain-deadness
Working through the examples in Boudewijn's book, I've come across something. In chap. 7, it discussing using signals and slots to create a little xml parser, which then displays in a tree list view. It just so happens that my next project is using xml and pyqt, so this interested me. However, (and I must be even more braindead than usual to not understand this) how do I associate the "data" with the "tag"? For instance, when you have a contruct like this: this is data, the unknown_starttag signal is fired when it reaches , and the handle_data signal is fired when it gets to "this is data", but I'm not getting how you would say that "when unknown_starttag fires on tag == "tag", then next handle_data should be directed to foo, which is what I want/need. Example code is attached (direct from the book!), along with example xml file (and you might see what my project is ;-). I don't need working code in response, just a general idea of what to do. Oh, and "get more sleep, idiot" would be valid, but non-helpful B-) Thanks, D.A.Bishop import sys import xmllib from qt import * TRUE=1 FALSE=0 class Parser(xmllib.XMLParser): def __init__(self, qObject, *args): xmllib.XMLParser.__init__(self) self.qObject=qObject def start(self, document): xmllib.XMLParser.feed(self, document) xmllib.XMLParser.close(self) def handle_xml(self, encoding, standalone): self.qObject.emit(PYSIGNAL("sigXML"), (encoding, standalone)) def handle_data(self, data): self.qObject.emit(PYSIGNAL("sigData"),(data,)) def unknown_starttag(self,tag, attributes): self.qObject.emit(PYSIGNAL("sigStartTag"), (tag,attributes)) def unknown_endtag(self, tag): self.qObject.emit(PYSIGNAL("sigEndTag"), (tag,)) class TreeView(QListView): def __init__(self, *args): apply(QListView.__init__,(self, ) + args) self.stack=[] self.setRootIsDecorated(TRUE) self.addColumn("Element") def startDocument(self, tag, attributes ): i=QListViewItem(self) if tag == None: tag = "None" i.setText(0, tag) self.stack.append(i) def startElement(self, tag, attributes): if tag == None: tag = "None" i=QListViewItem(self.stack[-1]) i.setText(0,tag) self.stack.append(i) def Data(self, data): print "", def endElement(self, tag): del(self.stack[-1]) def main(args): if (len(args) == 2): app=QApplication(sys.argv) QObject.connect(app, SIGNAL('lastWindowClosed()'), app, SLOT('quit()')) w = TreeView() app.setMainWidget(w) o=QObject() p=Parser(o) QObject.connect(o, PYSIGNAL("sigXML"),w.startDocument) QObject.connect(o, PYSIGNAL("sigStartTag"), w.startElement) QObject.connect(o, PYSIGNAL("sigData"), w.Data) QObject.connect(o, PYSIGNAL("sigEndTag"), w.endElement) s=open(args[1]).read() p.start(s) w.show() app.exec_loop() else: print "Usage: python qtparser.py FILE.xml" if __name__=="__main__": main(sys.argv) Treasures download Treasures 7/4/2003 17:29 EMusic.com EMusic.com http://www.emusic.com Portions Copyright (C) 2002 EMusic.com Inc; see http://www.emusic.com for more details [EMAIL PROTECTED] EMusic.com Emusic content server downloads.mp3.com /%fid/%f Not used 0 AFqUBgAARw7GNy1iHSoAAF7zBAAAXfMEAABCX8uvAEPazRg.AgBcUQGAQSQMGRzAA0JMVEyQdgejHFuDoHBXZqcF1ZE- 1 Treasures The Mirror Conspiracy Thievery Corporation Electronic Treasures.mp3 .mp3 128000 2 144 http://images.mp3.com/emusic/goodnoise/emusic_generic_cover_80x80.jpg
Re: [PyKDE] brain-deadness
On Sun, Jan 05, 2003 at 09:53:37PM -0800, Greg Fortune wrote: > On Sunday 05 January 2003 07:43 pm, [EMAIL PROTECTED] wrote: > > Working through the examples in Boudewijn's book, I've come across > > something. In chap. 7, it discussing using signals and slots to create > > a little xml parser, which then displays in a tree list view. It just > > so happens that my next project is using xml and pyqt, so this > > interested me. However, (and I must be even more braindead than usual > > to not understand this) how do I associate the "data" with the "tag"? > > For instance, when you have a contruct like this: this is > > data, the unknown_starttag signal is fired when it reaches , > > and the handle_data signal is fired when it gets to "this is data", but > > I'm not getting how you would say that "when unknown_starttag fires on > > tag == "tag", then next handle_data should be directed to foo, which is > > what I want/need. > > > > Example code is attached (direct from the book!), along with example xml > > file (and you might see what my project is ;-). I don't need working > > code in response, just a general idea of what to do. Oh, and "get more > > sleep, idiot" would be valid, but non-helpful B-) > > > > Thanks, > > > > D.A.Bishop > > > I haven't used the ListView much, but I think the following patch will work. > All you needed to do was add a column for the data and then do "some stuff" > in the Data function... If the patch doesn't work for you, I can send the > altered file. Note: ignore my variable names, etc, 'cause I just hacked > until it worked ;o) Thank you, between your example code and some theory that Gordon sent me off list, I'm on my way. Thanks again! D.A.Bishop ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde