From bryanbrun at yahoo.com Wed Aug 1 00:49:18 2001 From: bryanbrun at yahoo.com (Bryan Brunton) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? Message-ID: <20010731224914.88477.qmail@web11403.mail.yahoo.com> (Reposting due to no response from previous post) Does anyone have the QObject.tr() method working? You can use the .qm file from the QT 2.3.1 i8ln example to test the code down below. The QApplication.translate method will correctly translate. The tr method of the MyWidget object will not. Could someone test this? import sys from qt import * class MyWidget(QMainWindow): def __init__(self): QMainWindow.__init__(self,None,'',Qt.WDestructiveClose) self.setCaption( self.tr("Internationalization Example" ) ); if __name__ == '__main__': a = QApplication(sys.argv) QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()')) translator = QTranslator(None) translator.load( "mywidget_fr.qm", "." ) a.installTranslator( translator ) print(translator.contains("MyWidget", "Internationalization Example")) print(QTextCodec.locale()) w = MyWidget() w.setCaption(a.translate("MyWidget", "Internationalization Example")) a.setMainWidget(w) w.show() a.exec_loop() __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ From bsarempt at xs4all.nl Wed Aug 1 07:32:22 2001 From: bsarempt at xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? In-Reply-To: <20010731224914.88477.qmail@web11403.mail.yahoo.com> Message-ID: I want to get a section on translating applications in the last chapter on deploying applications, but I haven't arrived there. I'll be testing this as soon as I do... On Tue, 31 Jul 2001, Bryan Brunton wrote: > > (Reposting due to no response from previous post) > > Does anyone have the QObject.tr() method working? > > You can use the .qm file from the QT 2.3.1 i8ln example to test the code down below. The > QApplication.translate method will correctly translate. The tr method of the MyWidget object will > not. > > Could someone test this? > > > import sys > from qt import * > > class MyWidget(QMainWindow): > def __init__(self): > QMainWindow.__init__(self,None,'',Qt.WDestructiveClose) > self.setCaption( self.tr("Internationalization Example" ) ); > > if __name__ == '__main__': > a = QApplication(sys.argv) > QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()')) > translator = QTranslator(None) > translator.load( "mywidget_fr.qm", "." ) > a.installTranslator( translator ) > > print(translator.contains("MyWidget", "Internationalization Example")) > print(QTextCodec.locale()) > w = MyWidget() > w.setCaption(a.translate("MyWidget", "Internationalization Example")) > a.setMainWidget(w) > w.show() > a.exec_loop() > > > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde > From phrxy at csv.warwick.ac.uk Wed Aug 1 13:10:58 2001 From: phrxy at csv.warwick.ac.uk (John J. Lee) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] iterating over ListView Message-ID: http://doc.trolltech.com/qlistviewitemiterator.html describes how to get all selected items in a ListView -- since Qt iterators aren't implemented in PyQt, what is the easiest / best way to do this in PyQt? Recursively iterating over all items with the methods provided is a bit of a pain (and perhaps slow?). Thanks for any help John From ware at cis.ohio-state.edu Wed Aug 1 15:20:25 2001 From: ware at cis.ohio-state.edu (Pete Ware) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] iterating over ListView In-Reply-To: References: Message-ID: Is this what you are looking for? item = listview.firstChild () while item: if item.isSelected (): count = count + 1 item = item.nextSibling () --pete From phrxy at csv.warwick.ac.uk Wed Aug 1 16:04:39 2001 From: phrxy at csv.warwick.ac.uk (John J. Lee) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] iterating over ListView In-Reply-To: Message-ID: On 1 Aug 2001, Pete Ware wrote: > Is this what you are looking for? > > item = listview.firstChild () > while item: > if item.isSelected (): > count = count + 1 > item = item.nextSibling () Yes, stupid question of mine (well, actually, not quite: nextSibling won't go through the whole tree, I think, so you either have to recurse, or use the other method, whose name I forget, which gets the next visible item). I realised just after I posted my first message of course, and it's working now. Thanks anyway! John From kvs at valentine.thekompany.com Thu Aug 2 00:27:28 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] [cvs commit] 'sip ChangeLog' Message-ID: <200108012217.WAA08512@valentine.thekompany.com> Update of /public/sip In directory valentine.thekompany.com:/tmp/cvs-serv8482 Modified Files: ChangeLog Log Message: More build changes for Qt-NC. tr() is now properly handled for Qt v2.3.0 and earlier. From kvs at valentine.thekompany.com Thu Aug 2 00:27:30 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:24 2007 Subject: [PyKDE] [cvs commit] 'PyQt/pyuic Makefile.am' Message-ID: <200108012215.WAA08479@valentine.thekompany.com> Update of /public/PyQt/pyuic In directory valentine.thekompany.com:/tmp/cvs-serv8463/pyuic Modified Files: Makefile.am Log Message: More minor build changes. Fixed QApplication.winVersion(). Fixed Windows pyuic Makefiles. From kvs at valentine.thekompany.com Thu Aug 2 00:27:38 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip/sip gencode.c parser.y' Message-ID: <200108012217.WAA08516@valentine.thekompany.com> Update of /public/sip/sip In directory valentine.thekompany.com:/tmp/cvs-serv8482/sip Modified Files: gencode.c parser.y Log Message: More build changes for Qt-NC. tr() is now properly handled for Qt v2.3.0 and earlier. From kvs at valentine.thekompany.com Thu Aug 2 00:27:40 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip/siplib Makefile.am Makefile.in siplib.pro' Message-ID: <200108012217.WAA08520@valentine.thekompany.com> Update of /public/sip/siplib In directory valentine.thekompany.com:/tmp/cvs-serv8482/siplib Modified Files: Makefile.am Makefile.in siplib.pro Log Message: More build changes for Qt-NC. tr() is now properly handled for Qt v2.3.0 and earlier. From kvs at valentine.thekompany.com Thu Aug 2 00:27:41 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt ChangeLog build.sh qapplication.sip qt.sip-in qtgl.sip-in' Message-ID: <200108012215.WAA08475@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv8463 Modified Files: ChangeLog build.sh qapplication.sip qt.sip-in qtgl.sip-in Log Message: More minor build changes. Fixed QApplication.winVersion(). Fixed Windows pyuic Makefiles. From phil at river-bank.demon.co.uk Thu Aug 2 00:29:03 2001 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? References: <20010731224914.88477.qmail@web11403.mail.yahoo.com> Message-ID: <3B68832E.7025FB24@river-bank.demon.co.uk> Bryan Brunton wrote: > > (Reposting due to no response from previous post) > > Does anyone have the QObject.tr() method working? > > You can use the .qm file from the QT 2.3.1 i8ln example to test the code down below. The > QApplication.translate method will correctly translate. The tr method of the MyWidget object will > not. Which version of PyQt? It's broken in 2.4 but should be fixed in the 2.5 pre-releases. (But note that the 2.5 releases will only compile against Qt 2.3.1 - but that has been fixed in the CVS.) Phil From bsarempt at xs4all.nl Sat Aug 4 17:00:33 2001 From: bsarempt at xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Problems with 2.5pre4 Message-ID: I've tried compiling 2.5pre4 today, and I met a strange problem. While compiling went all-right, and installing too, running a simple application gave the following: boud@calcifer:~/src/cc/PyQt-2.5pre4 > python examples/application.py Traceback (most recent call last): File "examples/application.py", line 97, in ? class ApplicationWindow(QMainWindow): I suspect that this might be related to the appearance of a qtgl module (which gave problems because I did have installed the mesa development libs, but not the qt gl extensions). From jbublitz at nwinternet.com Mon Aug 6 18:25:43 2001 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] UpdateL PyKDE2 Release Status In-Reply-To: <200107291000.MAA02684@mats.gmd.de> Message-ID: I was hoping to have the PyKDE2 release ready in the next day or two, but it appears the release will slip a few days. I'm hoping to make it available late this week/early next week. We still have a few minor bugs related to building PyKDE2, and haven't set up a site for downloads/CVS. The current known problems are "showstoppers", but aren't major, so I don't expect a long delay. Jim From phil at river-bank.demon.co.uk Mon Aug 6 21:59:38 2001 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Problems with 2.5pre4 References: Message-ID: <3B6EF7AE.BCD2712A@river-bank.demon.co.uk> Boudewijn Rempt wrote: > > I've tried compiling 2.5pre4 today, and I met a strange > problem. While compiling went all-right, and installing > too, running a simple application gave the following: > > boud@calcifer:~/src/cc/PyQt-2.5pre4 > python examples/application.py > Traceback (most recent call last): > File "examples/application.py", line 97, in ? > class ApplicationWindow(QMainWindow): > > I suspect that this might be related to the appearance of > a qtgl module (which gave problems because I did have > installed the mesa development libs, but not the qt gl > extensions). I've changed the test for OpenGL support - it now tests whether Qt has been built with OpenGL support or not. I'm not sure if this helps your original problem or not. Phil From kvs at valentine.thekompany.com Mon Aug 6 22:26:43 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyKDE ChangeLog Makefile' Message-ID: <200108061948.TAA24416@valentine.thekompany.com> Update of /public/PyKDE In directory valentine.thekompany.com:/tmp/cvs-serv24411 Modified Files: ChangeLog Makefile Log Message: configure will now check for Qt v1.x. From kvs at valentine.thekompany.com Mon Aug 6 22:26:44 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyKDE/lib configure.in.in' Message-ID: <200108061948.TAA24420@valentine.thekompany.com> Update of /public/PyKDE/lib In directory valentine.thekompany.com:/tmp/cvs-serv24411/lib Modified Files: configure.in.in Log Message: configure will now check for Qt v1.x. From kvs at valentine.thekompany.com Mon Aug 6 22:26:50 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip ChangeLog' Message-ID: <200108062008.UAA24514@valentine.thekompany.com> Update of /public/sip In directory valentine.thekompany.com:/tmp/cvs-serv24509 Modified Files: ChangeLog Log Message: Fixed a problem registering a class that doesn't exist in a particular secondary version. From kvs at valentine.thekompany.com Mon Aug 6 22:26:57 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip/siplib siplib.c' Message-ID: <200108062008.UAA24522@valentine.thekompany.com> Update of /public/sip/siplib In directory valentine.thekompany.com:/tmp/cvs-serv24509/siplib Modified Files: siplib.c Log Message: Fixed a problem registering a class that doesn't exist in a particular secondary version. From kvs at valentine.thekompany.com Mon Aug 6 22:27:01 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip/sip gencode.c' Message-ID: <200108062008.UAA24518@valentine.thekompany.com> Update of /public/sip/sip In directory valentine.thekompany.com:/tmp/cvs-serv24509/sip Modified Files: gencode.c Log Message: Fixed a problem registering a class that doesn't exist in a particular secondary version. From kvs at valentine.thekompany.com Mon Aug 6 22:27:07 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt/lib configure.in.in' Message-ID: <200108061957.TAA24457@valentine.thekompany.com> Update of /public/PyQt/lib In directory valentine.thekompany.com:/tmp/cvs-serv24423/lib Modified Files: configure.in.in Log Message: Build changes for the qtgl module under Windows. The HTML documentation is no longer put into a compressed tar file. Fixed a minor bug in the widgets.py example. Changed the configure test fro OpenGL support. From kvs at valentine.thekompany.com Mon Aug 6 22:27:12 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt ChangeLog Makefile build.sh qglobal.sip qnamespace.sip qt.sip-in qtgl.sip-in qwindowdefs.sip' Message-ID: <200108061957.TAA24449@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv24423 Modified Files: ChangeLog Makefile build.sh qglobal.sip qnamespace.sip qt.sip-in qtgl.sip-in qwindowdefs.sip Log Message: Build changes for the qtgl module under Windows. The HTML documentation is no longer put into a compressed tar file. Fixed a minor bug in the widgets.py example. Changed the configure test fro OpenGL support. From kvs at valentine.thekompany.com Mon Aug 6 22:27:17 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt/examples widgets.py' Message-ID: <200108061957.TAA24453@valentine.thekompany.com> Update of /public/PyQt/examples In directory valentine.thekompany.com:/tmp/cvs-serv24423/examples Modified Files: widgets.py Log Message: Build changes for the qtgl module under Windows. The HTML documentation is no longer put into a compressed tar file. Fixed a minor bug in the widgets.py example. Changed the configure test fro OpenGL support. From kvs at valentine.thekompany.com Tue Aug 7 22:26:24 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt ChangeLog Makefile NEWS qbitmap.sip qcolor.sip qcursor.sip qobject.sip qpaintdevice.sip qpen.sip qpixmap.sip qsize.sip qsizepolicy.sip qt.sip-in qwindowdefs.sip' Message-ID: <200108071957.TAA27649@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv27633 Modified Files: ChangeLog Makefile NEWS qbitmap.sip qcolor.sip qcursor.sip qobject.sip qpaintdevice.sip qpen.sip qpixmap.sip qsize.sip qsizepolicy.sip qt.sip-in qwindowdefs.sip Log Message: Fixed a typo in the clean target. Added Qt3 support for QColor, QCursor, QObject, QPaintDevice, QPixmap and QSizePolicy. Added QColor.getHsv(). Added the Display opaque structure. Added qt_xdisplay(), qt_xscreen() and qt_xrootwin(). Added QPaintDevice.x11Display(), QPaintDevice.x11AppDisplay, QPaintDevice.x11SetAppDpiX() and QPaintDevice.x11SetAppDpiY(). Added the missing QPixmap.save() variant. From kvs at valentine.thekompany.com Wed Aug 8 01:26:25 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt qt3.sip-in ChangeLog Makefile NEWS build.sh qnamespace.sip qt.sip-in qwidget.sip qwindowdefs.sip' Message-ID: <200108072237.WAA28163@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv28155 Modified Files: ChangeLog Makefile NEWS build.sh qnamespace.sip qt.sip-in qwidget.sip qwindowdefs.sip Added Files: qt3.sip-in Log Message: QWidget is now converted to Qt3. Added the missing QWidget.customEvent(). Changed Display to be a class rather than a struct. Fix a problem with the normal build process caused by the new Qt3 stuff. Added the temporary qt3.sip-in file. From kvs at valentine.thekompany.com Thu Aug 9 02:26:14 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt ChangeLog build.sh qevent.sip qfont.sip qfontinfo.sip qmultilinedit.sip qt3.sip-in qtableview.sip qwindowdefs.sip' Message-ID: <200108082328.XAA31840@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv31835 Modified Files: ChangeLog build.sh qevent.sip qfont.sip qfontinfo.sip qmultilinedit.sip qt3.sip-in qtableview.sip qwindowdefs.sip Log Message: User events get converted to QCustomEvents rather than QEvents. Finally decided to implement Display * as void *. QEvent etc., QFont, QFontInfo, QMultiLineEdit and QTableView converted to Qt3. From zetml105 at hotmail.com Thu Aug 9 13:45:53 2001 From: zetml105 at hotmail.com (Thomas Austin) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Re: Turn $25 into $25,000 in 1 month! Message-ID: <200108091145.NAA10143@mail.gmd.de> Dear Friend: AS SEEN ON NATIONAL TV!!! "Make over $500,000 every 4 to 5 months working from your home for an investment of only $25 U.S. Dollars expense one time ..." THANKS TO THE COMPUTER AGE AND THE INTERNET! =============================================== BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR !! Before you delete this e-mail with the numerous others claiming to make you rich in a matter of months, please read the following. This is the letter you have been hearing about on the news lately. Due to the popularity of this letter on the internet, a national weekly news program recently devoted an entire show to the investigation of this program described below, to see if it really can make people money. The show also investigated whether or not the program was legal. Their findings proved once and for all that there are "absolutely no laws prohibiting the participation in the program, and if people can follow the simple instructions, they are bound to make some mega bucks with only $25 out-of-pocket cost!" DUE TO THE RECENT INCREASE OF POPULARITY & RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING BETTER THAN EVER !! This is what one person had to say: "Thanks to this profitable opportunity. I was approached many times before, but each time I passed on it. I am so glad I finally joined just to see what one could expect in return for the minimal effort and money required. To my astonishment, I received a total of $610,470.00 in 21 weeks, with money still coming in". Pam Hedland, Fort Lee, New Jersey. ------------------------------------------------------------ ------------- Here is another testimonial: "This program has been around for a long time but I never believed in it. But one day when I received this again in the mail I decided to gamble my $25 on it. I followed the simple instructions and walaa ..... 3 weeks later the money started to come in. First month I only made $240.00 but the next 2 months after that I made a total of $290,000.00. "So far, in the past 8 months by re-entering the program, I have made over $710,000.00 and I am playing it again. The key to success in this program is to follow the simple steps and NOT change anything." More testimonials later but first, ****** PRINT THIS NOW FOR YOUR FUTURE REFERENCE ******* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ If you would like to make at least $500,000 every 4 to 5 months easily and comfortably, please read the following ... .... THEN READ IT AGAIN and AGAIN !!! $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ FOLLOW THE SIMPLE INSTRUCTION BELOW ... AND YOUR FINANCIAL DREAMS WILL COME TRUE, GUARANTEED! I. INSTRUCTIONS: **** Order all 5 reports shown on the list below. **** For each report, send $5 CASH, THE NAME & NUMBER OF THE REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the person whose name appears ON THAT LIST next to the report. MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT CORNER in case of any mail problems. **** When you place your order, make sure you order each of the 5 reports. You will need all 5 reports so that you can save them on your computer and Resell them. YOUR TOTAL COST $5 X 5 = $25.00. **** Within a few days you will receive, via e-mail, each of the 5 reports from these 5 different individuals. Save them on your computer so they will be accessible for you to send to the 1,000's of people who will order them from you. Also make a floppy of these reports and keep it on your desk in case something happen to your computer. ****.IMPORTANT - DO NOT alter the names of the people who are listed next to each report, or their sequence on the list, in any way other than what is instructed below in Steps 1 through 6, or you will loose out on majority of your profits. Once you understand the way this works, you will also see how it does not work if you change it. Remember, this method has been tested, and if you alter it, it will NOT work!!! People have tried to put their friends/relatives names on all five thinking they could get all the money But it does not work this way. Believe us, we all have tried to be greedy and then nothing happened. So Do Not try to change anything other than what is instructed. Because if you do, it will not work for you. Remember, honesty reaps the reward!!! 1.. After you have ordered all 5 reports, take this advertisement and REMOVE the name & address of the person in REPORT # 5. This person has made it through the cycle and is no doubt counting their fortune. 2.... Move the name & address in REPORT # 4 down TO REPORT # 5. 3.... Move the name & address in REPORT # 3 down TO REPORT # 4. 4.... Move the name & address in REPORT # 2 down TO REPORT # 3. 5.... Move the name & address in REPORT # 1 down TO REPORT # 2 6.... Insert YOUR name & address in the REPORT # 1 Position. PLEASE MAKE SURE you copy every name & address ACCURATELY ! ========================================================= Take this entire letter, with the modified list of names, and save it on your computer. DO NOT MAKE ANY OTHER CHANGES. Save this on a disk as well just in case if you loose any data. To assist you with marketing your business on the internet, the 5 reports you purchase will provide you with invaluable marketing information which includes how to send bulk e-mails legally, where to find thousands of free classified ads and much more. There are 2 Primary methods to get this venture going: METHOD # 1 : BY SENDING BULK E-MAIL LEGALLY ============================================ Let's say that you decide to start small, just to see how it goes, and we will assume you and those involved send out only 5,000 e-mails each. Let's also assume that the mailing receive only a 0.2% response (the response could be much better but lets just say it is only 0.2% . Also many people will send out hundreds of thousands e-mails instead of only 5,000 each). Continuing with this example, you send out only 5,000 e-mails. With a 0.2% response, that is only 10 orders for report # 1. Those 10 people responded by sending out 5,000 e-mails each for a total of 50,000. Out of those 50,000 e-mails only 0.2% responded with orders. That's = 100 people responded and ordered Report # 2. Those 100 people mail out 5,000 e-mails each for a total of 500,000 e-mails. The 0.2% response to that is 1000 orders for Report # 3. Those 1000 people send out 5,000 e-mails each for a total of 5 million e-mails sent out. The 0.2% response to that is 10,000 orders for Report # 4. Those 10,000 people send out 5,000 e-mails each for a total of 50,000,000 (50 million) e-mails. The 0.2% response to that is 100,000 orders for Report # 5. THAT'S 100,000 ORDERS TIMES $5 EACH = $500,000.00 (half million). Your total income in this example is: 1..... $50 + 2..... $500 + 3..... $5,000 + 4..... $50,000 + 5..... $500,000 ......... Grand Total = $555,550.00 NUMBERS DO NOT LIE. GET A PENCIL & PAPER AND FIGURE OUT THE WORST POSSIBLE RESPONSES AND NO MATTER HOW YOU CALCULATE IT, YOU WILL STILL MAKE A LOT OF MONEY ! ------------------------------------------------------------ ------------------ REMEMBER FRIEND, THIS IS ASSUMING ONLY 10 PEOPLE ORDERING OUT OF 5,000 YOU MAILED TO. Dare to think for a moment what would happen if everyone, or half or even one 4th of those people mailed 100,000 e-mails each or more? There are over 250 million people on the internet worldwide and counting. Believe me, many people will do just that, and more! METHOD # 2 : BY PLACING FREE ADS ON THE INTERNET =================================================== Advertising on the net is very inexpensive and there are hundreds of FREE places to advertise. Placing a lot of free ads on the internet will easily get a larger response. We strongly suggest you start with Method # 1 and add METHOD # 2 as you go along. For every $5 you receive, all you must do is e-mail them the Report they ordered. That's it . Always provide same day service on all orders. This will guarantee that the e-mail they send out,with your name and address on it, will be prompt because they can not advertise until they receive the report. ORDER EACH REPORT BY ITS NUMBER & NAME ONLY. Notes: Always send $5 cash (U.S. CURRENCY) for each Report. Checks NOT accepted. Make sure the cash is concealed by wrapping it in at least 2 sheets of paper. On one of those sheets of paper, Write the NUMBER & the NAME of the Report you are ordering, YOUR E-MAIL ADDRESS and your name and postal address. $$$$$$$$$$$$$$$$$$$$$$ PLACE YOUR ORDER FOR THESE REPORTS NOW : REPORT#1 "The Insider's Guide to Sending Bulk E-mail on the Internet" ORDER REPORT#1 FROM:: WebWorks Partners 200 Roper Meadow Drive Simpsonville, SC 29681 REPORT#2 "The Insiders Guide to Advertising for Free on the Internet" ORDER REPORT#2 FROM: Brian Healy 8307 NW 68 th street Suite 1099 Miami, Fl 33166-2654 REPORT#3 "The Secrets to Multilevel Marketing on the Internet" ORDER REPORT#3 FROM: CMR Po.Bx 269 Shiocton Wi.54170 thisworks2@excite.com REPORT#4 " How to become a Millionaire untilizing the Power of Multi Level Marketing and the Internet" ORDER REPORT#4 FROM: SandD Marketing P.O. Box 8365 LA Crescenta, CA 91224 REPORT#5 "How to Send 1,000,000 e-mails for FREE" ORDER REPORT#5 FROM: M.L.D 1816 S. 312 Federal way Wa, 98003 There are currently more than 250,000,000 people online worldwide! $$$$$$$$$ YOUR SUCCESS GUIDELINES $$$$$$$$$$$ Follow these guidelines to guarantee your success: If you do not receive at least 10 orders for Report #1 within 2 weeks, continue sending e-mails until you do. After you have received 10 orders, 2 to 3 weeks after that you should receive 100 orders or more for REPORT # 2. If you did not, continue advertising or sending e-mails until you do. Once you have received 100 or more orders for Report # 2, YOU CAN RELAX, because the system is already working for you,and the cash will continue to roll in ! THIS IS IMPORTANT TO REMEMBER : Every time your name is moved down on the list, you are placed in front of a different report. You can KEEP TRACK of your PROGRESS by watching which report people are ordering from you. IF YOU WANT TO GENERATE MORE INCOME SEND ANOTHER BATCH OF E-MAILS AND START THE WHOLE PROCESS AGAIN. There is NO LIMIT to the income you can generate from this business !!! ____________________________________________________ FOLLOWING IS A NOTE FROM THE ORIGINATOR OF THIS PROGRAM: You have just received information that can give you financial freedom for the rest of your life, with NO RISK and JUST A LITTLE BIT OF EFFORT. You can make more money in the next few weeks and months than you have ever imagined. Follow the program EXACTLY AS INSTRUCTED. Do not change it in any way. It works exceedingly well as it is now. Remember to e-mail a copy of this exciting report after you have put your name And address in Report #1 and moved others to #2...........# 5 as instructed above. One of the People you send this to may send out 100,000 or more e-mails and your name will be on everyone of them. Remember though, the more you send out the more potential customers you will reach. So my friend, I have given you the ideas, information, materials and opportunity to become financially independent. IT IS UP TO YOU NOW ! ************** MORE TESTIMONIALS **************** "My name is Mitchell. My wife , Jody and I live in Chicago. I am an accountant with a major U.S. Corporation and I make pretty good money. When I received this program I grumbled to Jody about receiving ''junk mail''. I made fun of the whole thing, spouting my knowledge of the population and percentages involved. I ''knew'' it wouldn't work. Jody totally ignored my supposed intelligence and few days later she jumped in with both feet. "I made merciless fun of her, and was ready to lay the old ''I told you so'' on her when the thing didn't work. Well, the laugh was on me! Within 3 weeks she had received 50 responses. "Within the next 45 days she had received a total of $ 147,200.00 all cash! I was shocked. I have joined Jody in her ''hobby." Mitchell Wolf, Chicago, Illinois ------------------------------------------------------------ "Not being the gambling type, it took me several weeks to make up my mind to participate in this plan. But conservative that I am, I decided that the initial investment was so little that there was just no way that I wouldn't get enough orders to at least get my money back. "I was surprised when I found my medium size post office box crammed with orders. I made $319,210.00 in the first 12 weeks. "The nice thing about this deal is that it does not matter where people live. There simply isn't a better investment with a faster return and so big." Dan Sondstrom, Alberta, Canada "I had received this program before. I deleted it, but later I wondered if I should have given it a try. Of course, I had no idea who to contact to get another copy, so I had to wait until I was e-mailed again by someone else.........11 months passed then it luckily came again...... "I did not delete this one! I made more than $490,000 on my first try and all the money came within 22 weeks". Susan De Suza, New York, N.Y. ORDER YOUR REPORTS TODAY AND GET STARTED ON YOUR ROAD TO FINANCIAL FREEDOM ! ======================================================= If you have any questions of the legality of this program, contact the Office of Associate Director for Marketing Practices, Federal Trade Commission, Bureau of Consumer Protection, Washington, D.C. Under Bill s.1618 TITLE III passed by the 105th US Congress this letter cannot be considered spam as long as the sender includes contact information and a method of removal. This is one time e-mail transmission. No request for removal is necessary. ------------------------------------------------------------ This message is sent in compliance of the new email Bill HR 1910. Under Bill HR 1910 passed by the 106th US Congress on May 24, 1999, this message cannot be considered Spam as long as we include the way to be removed. Per Section HR 1910, Please type "REMOVE" in the subject line and reply to this email. All removal requests are handled personally an immediately once received. Removal mail to: zetml105.hotmail.com From kvs at valentine.thekompany.com Fri Aug 10 17:25:59 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt ChangeLog qt3.sip-in' Message-ID: <200108101454.OAA04728@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv4715 Modified Files: ChangeLog qt3.sip-in Log Message: Fixed type in the Qt3 versioning. From kvs at valentine.thekompany.com Fri Aug 10 17:26:01 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip ChangeLog TODO' Message-ID: <200108101459.OAA04741@valentine.thekompany.com> Update of /public/sip In directory valentine.thekompany.com:/tmp/cvs-serv4736 Modified Files: ChangeLog TODO Log Message: Python classes that have to be imported are done so at the start of the module, not immediately before they are first needed. From kvs at valentine.thekompany.com Fri Aug 10 17:26:04 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip/sip gencode.c parser.y sip.h' Message-ID: <200108101459.OAA04745@valentine.thekompany.com> Update of /public/sip/sip In directory valentine.thekompany.com:/tmp/cvs-serv4736/sip Modified Files: gencode.c parser.y sip.h Log Message: Python classes that have to be imported are done so at the start of the module, not immediately before they are first needed. From jbublitz at nwinternet.com Fri Aug 10 20:25:34 2001 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] PyKDE2 Update In-Reply-To: <200108101000.MAA13924@mats.gmd.de> Message-ID: Once again, the PyKDE2 release will be delayed. I'm now anticipating that PyKDE2 will be available in 2 to 3 weeks. The issues that are causing the delay are related to code generation. They aren't major bugs, but they are bugs, and until they're fixed it's still necessary to hand modify some files to get PyKDE2 to build. I'm not promising that when PyKDE2 is released that it will be bug free, but I do want it to build cleanly and reliably. I apologize for the delays, but ask you to keep in mind that the changes from KDE1 to KDE2 were major in terms of writing Python bindings. We're also trying to establish a solid codebase so that future releases (eg KDE2.2 should be available Monday - I'm still working on bindings for KDE2.1.x) will be available in a more timely fashion. (Now I'll have to make up a new excuse for future delays :) Jim From kvs at valentine.thekompany.com Fri Aug 10 20:25:57 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip/sip gencode.c' Message-ID: <200108101752.RAA05174@valentine.thekompany.com> Update of /public/sip/sip In directory valentine.thekompany.com:/tmp/cvs-serv5160/sip Modified Files: gencode.c Log Message: Fixed missing popVersion() in gencode.c. From kvs at valentine.thekompany.com Fri Aug 10 20:25:59 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt ChangeLog Makefile NEWS' Message-ID: <200108101803.SAA05217@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv5212 Modified Files: ChangeLog Makefile NEWS Log Message: Final documentation changes for v2.5. From kvs at valentine.thekompany.com Fri Aug 10 20:26:06 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyKDE ChangeLog Makefile NEWS kconfigbase.sip kdecore.sip-in kdeui.sip-in kfile.sip-in kfileinfo.sip kfm.sip-in khtmlw.sip-in kspell.sip-in' Message-ID: <200108101744.RAA05152@valentine.thekompany.com> Update of /public/PyKDE In directory valentine.thekompany.com:/tmp/cvs-serv5129 Modified Files: ChangeLog Makefile NEWS kconfigbase.sip kdecore.sip-in kdeui.sip-in kfile.sip-in kfileinfo.sip kfm.sip-in khtmlw.sip-in kspell.sip-in Log Message: Removed KConfigBase.writeEntry() variants that couldn't be called. Removed imports of QT_VERSION from handwritten Python code. Converted KFileInfoList to %MappedType. An empty KFileInfoList is converted to an empty Python list rather than None. From kvs at valentine.thekompany.com Fri Aug 10 20:26:10 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'sip ChangeLog NEWS configure.in' Message-ID: <200108101752.RAA05170@valentine.thekompany.com> Update of /public/sip In directory valentine.thekompany.com:/tmp/cvs-serv5160 Modified Files: ChangeLog NEWS configure.in Log Message: Fixed missing popVersion() in gencode.c. From kafka.fr at netcourrier.com Fri Aug 10 20:58:22 2001 From: kafka.fr at netcourrier.com (Yves BAILLY) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Re: PyKDE2 Update In-Reply-To: References: Message-ID: <0108102059270G.01005@kafka.coagul.org> Hello Jim, On Friday 10 August 2001 20:02, Jim Bublitz wrote: > Once again, the PyKDE2 release will be delayed. I'm now > anticipating that PyKDE2 will be available in 2 to 3 weeks. > > The issues that are causing the delay are related to code > generation. They aren't major bugs, but they are bugs, and until > they're fixed it's still necessary to hand modify some files to get > PyKDE2 to build. I'm not promising that when PyKDE2 is > released that it will be bug free, but I do want it to build > cleanly and reliably. I won't speak for others, but in my own humble opinion : - you're doing a wonderful job ; - an unreliable code is useless when you lack the time to debug it. So : keep cool, go on the (already) good work (I wish I could help, but I'm not even skilled enough - and I have no time). I'm ready to wait the needed time to have the best possible release, and I guess I'm not the only one. And stop loosing time in apologizes ;-) Best regards, -- .~. __________________________ /V\ Linux / \ ___ // \\ Power | Yves BAILLY | /" "\ /( )\ | kafka.fr@netcourrier.com | ( @ _ @ ) - ^^-^^ -------\__________________________/----oOO (_) OOo------ LUG Dijon : http://www.coagul.org From phil at river-bank.demon.co.uk Sat Aug 11 18:08:32 2001 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] ANNOUNCE: SIP/PyQt/PyKDE v2.5 Message-ID: <3B75586B.157E731F@river-bank.demon.co.uk> SIP, PyQt and PyKDE v2.5 are now ready for download. The actual file locations have changed with this release so it's best to follow the links on the web site. Highlights of the release include... - Support for the non-commercial edition of Qt under Windows. Once again I am able to provide PyQt binaries for Windows. - The addition of the qtgl module that supports the Qt OpenGL classes (and check the new gears.py example script). - The addition of the Qt QDom XML classes. - Lots of other small enhancements and the odd bug fix. In previous releases there was one source package that supported all Qt versions. Starting from this release different source packages are provided for different Qt versions. For those using SIP to wrap your own classes, it now supports namespaces and nested classes. There are some incompatabilities from v2.4. Phil From bsarempt at xs4all.nl Sun Aug 12 08:01:28 2001 From: bsarempt at xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] ANNOUNCE: SIP/PyQt/PyKDE v2.5 In-Reply-To: <3B75586B.157E731F@river-bank.demon.co.uk> Message-ID: On Sat, 11 Aug 2001, Phil Thompson wrote: > SIP, PyQt and PyKDE v2.5 are now ready for download. The actual file > locations have changed with this release so it's best to follow the > links on the web site. > PyQt must be getting popular if this announcement can bring the theKompany.com ftp server to its knees :-). From jgardn at u.washington.edu Mon Aug 13 13:31:43 2001 From: jgardn at u.washington.edu (Jonathan Gardner) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Installation troubles... Message-ID: <01081304351500.01133@linux> I'm running SuSE 7.1, with python 2.1 and qt-2.3.1. I got sip-2.5 installed without a hitch. I did: ./configure make make install I compiled PyQt-2.5 without a hitch. I did: ./configure make But when I do 'make install', it says the following: Making install in qt /bin/sh ../libtool --mode=install /usr/bin/install -c libqtcmodule.la /usr/lib/python2.1/sit e-packages/libqtcmodule.la /usr/bin/install -c .libs/libqtcmodule-2.5.so /usr/lib/python2.1/site-packages/libqtcmodule-2 .5.so (cd /usr/lib/python2.1/site-packages && rm -f libqtcmodule.so && ln -s libqtcmodule-2.5.so li bqtcmodule.so) /usr/bin/install -c .libs/libqtcmodule.lai /usr/lib/python2.1/site-packages/libqtcmodule.la PATH="$PATH:/sbin" ldconfig -n /usr/lib/python2.1/site-packages /bin/sh ../mkinstalldirs /usr/lib/python2.1/site-packages /usr/bin/install -c -m 644 ./qt.py /usr/lib/python2.1/site-packages/qt.py make install-data-hook make[3]: Entering directory `/home/jgardn/tmp/PyQt-2.5/qt' (cd /tmp; PYTHONPATH=/usr/lib/python2.1/site-packages:/usr/lib/python2.1/site-packages /usr/b in/python -O -c "import qt") Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/site-packages/qt.py", line 44, in ? import libqtc ImportError: undefined symbol: __ti15QInterlaceStyle Any ideas? Off the top of my head, it looks like it finds libqtcmodule.so okay, but there is some problem trying to link to it. --Jonathan From jgardn at u.washington.edu Mon Aug 13 14:08:25 2001 From: jgardn at u.washington.edu (Jonathan Gardner) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Installation troubles... In-Reply-To: <01081304351500.01133@linux> References: <01081304351500.01133@linux> Message-ID: <01081305115803.01133@linux> On Monday 13 August 2001 04:35 am, I wrote: > I'm running SuSE 7.1, with python 2.1 and qt-2.3.1. > > I got sip-2.5 installed without a hitch. I did: > ./configure > make > make install > > I compiled PyQt-2.5 without a hitch. I did: > ./configure > make > > PYTHONPATH=/usr/lib/python2.1/site-packages:/usr/lib/python2.1/site-packa >ges /usr/b > in/python -O -c "import qt") > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.1/site-packages/qt.py", line 44, in ? > import libqtc > ImportError: undefined symbol: __ti15QInterlaceStyle > > > Any ideas? Off the top of my head, it looks like it finds libqtcmodule.so > okay, but there is some problem trying to link to it. > Humm, it looks like I didn't have qt-2.3.1 configured quite right. For some reason, when I 'su' to root using just 'su', LD_LIBRARY_PATH doesn't get passed along. If I 'su -' I have it configured correctly so LD_LIBRARY_PATH is set up properly. Sorry to bother you all. The "gears.py" demo is great. Keep up the good work. Jonathan From Pikecolter at aol.com Tue Aug 14 00:50:06 2001 From: Pikecolter at aol.com (Pikecolter@aol.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] From: Elizabeth Shelton Message-ID: <66.12cf3d60.28a9b378@aol.com> Please send me more information on telecommuters. Thanks, Elizabeth Shelton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20010814/b50272df/attachment.html From kvs at valentine.thekompany.com Tue Aug 14 18:25:32 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt qdesktopwidget.sip qdockarea.sip qdockwindow.sip ChangeLog Makefile NEWS qapplication.sip qbytearray.sip qclipboard.sip qcolorgroup.sip qcstring.sip qdatetime.sip qfontmetrics.sip qiconset.sip qimage.sip qiodevice.sip qmainwindow.sip qmime.sip qmovie.sip qpalette.sip qstring.sip qt.sip-in qt3.sip-in qtoolbar.sip' Message-ID: <200108141610.QAA20282@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv20263 Modified Files: ChangeLog Makefile NEWS qapplication.sip qbytearray.sip qclipboard.sip qcolorgroup.sip qcstring.sip qdatetime.sip qfontmetrics.sip qiconset.sip qimage.sip qiodevice.sip qmainwindow.sip qmime.sip qmovie.sip qpalette.sip qstring.sip qt.sip-in qt3.sip-in qtoolbar.sip Added Files: qdesktopwidget.sip qdockarea.sip qdockwindow.sip Log Message: Added the QDesktopWidget, QDockArea and QDockWindow Qt3 widgets. Fully converted the QApplication, QClipboard, QChar, QColorGroup, QDate, QDateTime, QFontMetrics, QIconSet, QMainWindow, QMimeSource, QMimeSourceFactory, QPalette, QString, QTime and QToolBar classes to Qt3. Added the missing QChar.nbsp, QChar.isLetterOrNumber(), QChar.mirroredChar(), QImage.inputFormatList(), QImage.outputFormatList(), QMimeSourceFactory.filePath(), QMimeSourceFactory.addFilePath() and QPalette.inactive() methods. Added the missing QString.append() and QString.prepend() variants. Renamed QTime.IsValidTime() to QTime.isValidTime(). Made QList a mapped type now that SIP can handle mapped templates. From kvs at valentine.thekompany.com Wed Aug 15 21:25:22 2001 From: kvs at valentine.thekompany.com (kvs@valentine.thekompany.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] [cvs commit] 'PyQt qtextedit.sip ChangeLog NEWS qframe.sip qhbox.sip qmultilinedit.sip qpainter.sip qpicture.sip qpointarray.sip qrect.sip qregexp.sip qregion.sip qsessionmanager.sip qstyle.sip qstylesheet.sip qt.sip-in qt3.sip-in qtabbar.sip qtable.sip qtextcodec.sip qtextview.sip qtranslator.sip qvalidator.sip qvariant.sip qvbox.sip qwmatrix.sip' Message-ID: <200108151918.TAA26969@valentine.thekompany.com> Update of /public/PyQt In directory valentine.thekompany.com:/tmp/cvs-serv26903 Modified Files: ChangeLog NEWS qframe.sip qhbox.sip qmultilinedit.sip qpainter.sip qpicture.sip qpointarray.sip qrect.sip qregexp.sip qregion.sip qsessionmanager.sip qstyle.sip qstylesheet.sip qt.sip-in qt3.sip-in qtabbar.sip qtable.sip qtextcodec.sip qtextview.sip qtranslator.sip qvalidator.sip qvariant.sip qvbox.sip qwmatrix.sip Added Files: qtextedit.sip Log Message: Added the Qt3 classes QRegExpValidator and QTextEdit. Added the missing QPainter.pos() and QTranslator.messages() methods. Added all methods that use QDataStream now that it has been implemented. Removed QTableHeader as it isn't part of the documented API. Fully converted the QFrame, QHBox, QPainter, QPicture, QPointArray, QRect, QRegExp, QSessionManager, QStyleSheet, QStyleSheetItem, QTab, QTabBar, QTextCodec, QTextView, QTranslator, QTranslatorMessage, QVariant, QVBox and QWMatrix classes to Qt3. From alanb at adsmr.co.za Thu Aug 16 16:24:48 2001 From: alanb at adsmr.co.za (Alan Bowden) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Run time problem with PyQt 2.5 Message-ID: <315FBAC31883D4118F5F0010B554505B37CA45@node249.adsmr.co.za> Problem summary: Python library, libqtc is not found since I upgraded python, Qt, sip and PyQt. The Qt examples compile and run perfectly. Details of problem: The software version are as follows: Mandrake 8.0 python 2.1 Qt 2.3.1 upgraded from 2.3.0 sip 2.5 upgraded from 2.4 PyQt 2.5 upgraded from 2.4 With the old versions, the software runs fine. When running any python program which includes "py", I then got the following error: Traceback (most recent call last): File "iws.py", line 19, in ? import qt ImportError: No module named qt After reading "./pydoc site", I added the file, /usr/local/lib/site-python/qt.pth containing: /opt/PyQt-2.5/qt /opt/PyQt-2.5/qtgl The error changed to the following: Traceback (most recent call last): File "iws.py", line 19, in ? import qt File "/opt/PyQt-2.5/qt/qt.py", line 44, in ? import libqtc ImportError: No module named libqtc qt.py includes libqtc, but I have searched the entire disk and there is no libqtc.py file. There is a libqtc.so file and I assume that the python binding to this is what is missing. What can I try next to resolve this? Thanks for any response, Alan Bowden From th. at gmx.de Thu Aug 16 20:42:46 2001 From: th. at gmx.de (Thorsten Horstmann) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] spams (once again) References: Message-ID: <3B7C1512.16441C60@gmx.de> Curtis Taylor wrote: > Is there any way we can filter this stuff out? As far as I know mailman don't support spam filters. One possibility is to install the filter in the sendmail demon. Unfortunately our current sendmail installation don't support this feature. The other solution would be to restrict the posting privilege only to the list members. To problem here is that many people have more than one eMail address (e.g. at home, work, uni, ...), but they are subscribed only with one of these. So every mail from an 'unknown' sender is hold for manually approval. IMHO is the 'annoyance' from spams in this list at the moment acceptable. Any other opinions or comments ? -Thorsten From erikw at lineo.com Thu Aug 16 20:56:22 2001 From: erikw at lineo.com (Erik Weber) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] spams (once again) References: <3B7C1512.16441C60@gmx.de> Message-ID: <002701c12686$06794ad0$d11cbbd0@eriks> > IMHO is the 'annoyance' from spams in this list at the moment > acceptable. > Any other opinions or comments ? I agree! Spam gets lost in all the notices from CVS (Concurrent Version Spam). Besides, it's Python, a little spam is expected. ;-> -Erik Weber Lineo Seattle 206.285.2506 x204 Lineo: Where Open Meets Smart From adam.brett at mail.internetseer.com Fri Aug 17 06:13:30 2001 From: adam.brett at mail.internetseer.com (adam.brett@mail.internetseer.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Your Web Site is Now Responding Message-ID: <7500956.998021575715.JavaMail.promon@uranus> We are pleased to inform you that Your Web site is back up and is no longer on error. URL: http://mats.gmd.de/mailman/listinfo/pykde/ Time: 2001-08-17 00:12:55 As mentioned in the first alert, InternetSeer is conducting an ongoing study of the true connectivity of the Web. As recommended by the Robots Guidelines, this email is being sent to explain our research activities and to let you know about the difficulty in connecting to your site. If you would like InternetSeer to continue to alert you at no charge whenever there is a problem reaching your Web site, click here: http://scclick.internetseer.com/sitecheck/clickthrough.jsp?I5s57h5g5i5l5k55V5qzJSDzsc15tN6tPW5aMN_5bDV53U5pXTxy5p5b5cN6tPW5aMN_5bDV5cN6tLIC6uy5bCSzPSHDw5byAQVM5b53T5p5e=e3 InternetSeer does not store or publish the content of your pages, but rather uses availability and link information for our research. Click here to learn more about InternetSeer. http://scclick.internetseer.com/sitecheck/clickthrough.jsp?I5s57h5g5i5l5k55V5qzJSDzsd15tN6tPW5aMN_5bDV53U5pXTxy5p5b5cN6tPW5aMN_5bDV5cN6tLIC6uy5bCSzPSHDw5byAQVM5b53T5p5f=e3 Adam Brett Survey Manager cs-adam.brett@mail.internetseer.com Note: If you prefer not to receive these occasional alerts regarding the availability of your Web site, reply to this email with Cancel in the subject line. Please leave a full copy of this message in the body of your reply email. ##pykde@mats.gmd.de## -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20010817/d1058067/attachment.html From alanb at adsmr.co.za Fri Aug 17 12:24:58 2001 From: alanb at adsmr.co.za (Alan Bowden) Date: Thu Mar 8 10:26:25 2007 Subject: FW: [PyKDE] Run time problem with PyQt 2.5 Message-ID: <315FBAC31883D4118F5F0010B554505B37CB96@node249.adsmr.co.za> Seems that the problem is with checkinstall, a utility for creating RPMs from packages that require a "make install" step. I ran "make install" without using checkinstall on sip and PyQt and it is working now. Alan > ---------- > From: Jonathan Gardner[SMTP:jgardn@u.washington.edu] > Sent: 16 August 2001 08:05 > To: Alan Bowden > Subject: Re: [PyKDE] Run time problem with PyQt 2.5 > > On Thursday 16 August 2001 07:29 am, you wrote: > > > The error changed to the following: > > Traceback (most recent call last): > > File "iws.py", line 19, in ? > > import qt > > File "/opt/PyQt-2.5/qt/qt.py", line 44, in ? > > import libqtc > > ImportError: No module named libqtc > > > > qt.py includes libqtc, but I have searched the entire disk and > > there is no libqtc.py file. There is a libqtc.so file and I assume > > that the python binding to this is what is missing. > > > > What can I try next to resolve this? > > > > It looks like, at first glance, that the 'make install' didn't complete > successfully when you installed 2.5. There should be a 'qt.py' script > somewhere along the python path, and near that there should be a > 'libqtcmodule.so' and friends. > > The other problem may be that the python path is not configured correctly. > > > Jonathan > From gvermeul at labs.polycnrs-gre.fr Sat Aug 18 11:18:09 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] sip generated code does not compile Message-ID: <200108180918.f7I9I7U00344@labs.polycnrs-gre.fr> Phil, while adapting my PyQwt extension to sip/PyQt-2.5, sip generated some code that does not compile (no problems with sip-2.5pre1, sip-2.4 and earlier). There is some sort of "horizon" effect with inclusion of the declarations of 'sipQClasses' in combination with protected member functions. To be more precise (code fragments in the PPS): QwtArrowButton is derived from QPushButton, which is derived from QButton. QButton has protected member functions, so for instance this line of code is generated by sip in the C++ code wrapping QwtArrowButton: sipQButton::sipVH_drawButton(&sipPyMethods[89],sipPyThis,relLock,a0); But, the declaration for sipQButton is not included in the corresponding header file. Of course, it is easy to work around this sip bug (see below). Gerard PS: quite a few things changed going from sip/PyQt-2.5pre1 to 2.5. The fact that PyQt-2.5pre4 would only build for brand new versions of Qt prevented me from testing (too lazy for CVS). Maybe, you should release PyQt in a version intermediate between the CVS and your actual releases: generate the documentation (not everyone has a working db2html) and let sip generate the code needed for the version of Qt present on the system. At least, that is how I am going to release the next version of PyQwt. PPS: the code fragments: -- start excerpt from qwt_arrbtn.sip -- %HeaderCode #include %End class QwtArrowButton: QPushButton { public: enum Direction { Up, Down, Left, Right }; QwtArrowButton(int, Direction, QWidget * /TransferThis/, const char * = 0); Direction dir() const; int num() const; QSize sizeHint() const; protected: void drawButtonLabel (QPainter *); }; -- end excerpt -- This leads to the following code fragment from 'sipqwtArrowButton.cpp', that fails to compile, unless I add a line: #include "sipqtQButton.h" // overlooked by sip! to the sip generated header file 'sipqwtArrowButton.h' -- start fragment from sipqwtArrowButton.cpp -- void sipQwtArrowButton::drawButtonLabel(QPainter * a0) { int relLock; if (sipIsPyMethod(&sipPyMethods[88],sipPyThis,NULL,sipName_qt_drawButtonLabel,&relLock)) sipQButton::sipVH_drawButtonLabel(&sipPyMethods[88],sipPyThis,relLock,a0); else QwtArrowButton::drawButtonLabel(a0); } void sipQwtArrowButton::drawButton(QPainter * a0) { int relLock; if (sipIsPyMethod(&sipPyMethods[89],sipPyThis,NULL,sipName_qt_drawButton,&relLock)) sipQButton::sipVH_drawButton(&sipPyMethods[89],sipPyThis,relLock,a0); else QPushButton::drawButton(a0); } -- end fragment -- --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Sat Aug 18 14:46:26 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01081813454400.32659@localhost.localdomain> Hello I have the same problem that Joerg JKaercher reported 8 Jun 2001, unfortunatly his email conversation with Phil did not seem to come to any conclusion. So Im stuck. I compile my extension (source below) with no error, then get the following error when importing: Traceback (most recent call last): File "MMM.py", line 6, in ? import libMMMc ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: __ti3CCC [john@localhost sip]$ python MMM.py Traceback (most recent call last): File "MMM.py", line 6, in ? import libMMMc ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: __ti3CCC My system is: Dell Inspiron 8000 Mandrake 8.0 KDE 2.1.1 QT 2.3.0 KDEDIR = /usr QTDIR = /usr/lib/qt2 libtool 1.4 ********** CCC.h ********** #include #include class CCC : public QPushButton { Q_OBJECT public: CCC(QWidget* parent=0, const char* name=0); ~CCC(); public slots: void setNumber(const QString&); private slots: void onButtonClicked(); private: float number; signals: void result(const QString&); }; ********** CCC.cpp ********** #include "CCC.h" CCC::CCC(QWidget* parent, const char* name) : QPushButton("&Cube", parent, name) { number = 0.; //connect(this, SIGNAL(clicked()), SLOT(onButtonClicked())); } CCC::~CCC() { } void CCC::setNumber(const QString& n) { bool ok; float newNumber = n.toFloat(&ok); if (ok) { number = newNumber; } } void CCC::onButtonClicked() { QString res; res.sprintf("%f", number*number*number); emit result(res); } ********** MMM.sip ********** // --------------------------------------------------------------- // This is the SIP interface definition for the MMM module. // Based on qtgl.sip // --------------------------------------------------------------- %Module MMM %Import qt.sip %Include CCC.sip %VersionCode #include %End %Makefile Makefile.am .o # Makefile for building MMM with autoconf/automake/libtool. MMM_SOURCES = \ $S \ MMM.py SIP_FILES = \ CCC.sip \ MMM.sip noinst_PROGRAMS = sip_helper sip_helper_SOURCES = sip_helper$c sip_helper_LDADD = $$(SIP_LDLIBDIRS) -lqt -lXext $$(SIP_LDXFLAGS) # --------------------------------------------------------------- # rebuild-src (dummy file) depends on sipjjProxyjj.h so that sip will be called # --------------------------------------------------------------- sipMMMProxyMMM.h: rebuild-src # --------------------------------------------------------------- # sip outputs c++ files from 'SIP interface definition' files # --------------------------------------------------------------- rebuild-src: $$(SIP_FILES) sip -I ../sip -I $$(SIP_SIPINSTALLDIR) -c . ../sip/MMM.sip touch rebuild-src sipMMMDeclMMM.h: sipMMMVersion.h sipMMMVersion.h: sip_helper ./sip_helper >sipMMMVersion.h # --------------------------------------------------------------- # MOC stuff # sipMMMProxyMMM.moc is included by MMMcmodule.cpp (thats how it gets compiled) # --------------------------------------------------------------- MMMcmodule.cpp: sipMMMProxyMMM.moc sipMMMProxyMMM.moc: sipMMMProxyMMM.h sipMMMVersion.h $$(CXXCPP) $$(SIP_CPPFLAGS) sipMMMProxyMMM.h >moc_sipMMMProxyMMM.h $$(SIP_MOC) -o sipMMMProxyMMM.moc moc_sipMMMProxyMMM.h CLEANFILES = \ MMM.pyc sip_helper sipMMMVersion.h sipMMMProxyMMM.moc \ moc_sipMMMProxyMMM.h sip* Makefile* MMM.py MMMcmodule* rebuild-src AM_CPPFLAGS = $$(SIP_CPPFLAGS) AM_CXXFLAGS = $$(SIP_CXXFLAGS) libdir = $$(SIP_PYTHONDLMODULES) datadir = $$(SIP_PYTHONMODULES) data_DATA = MMM.py lib_LTLIBRARIES = lib$mcmodule.la lib$mcmodule_la_SOURCES = $$(MMM_SOURCES) lib$mcmodule_la_LDFLAGS = -release 2.5 lib$mcmodule_la_LIBADD = -L/usr/lib/qt2/lib -L$$(DESTDIR)$$(libdir) -lqtcmodule $$(SIP_LDLIBDIRS) -lsip -lqt $$(SIP_LDXFLAGS) install-data-hook: (cd /tmp; PYTHONPATH=$$(DESTDIR)$$(datadir):$$(DESTDIR)$$(libdir) $$(PYTHONINTERP) -O -c "import MMM") %End ********** CCC.sip ********** class CCC : QPushButton { %HeaderCode #include "CCC.h" %End public: CCC(QWidget * /TransferThis/ = 0, const char * = 0); public slots: void setNumber(const QString&); signals: void result(const QString&); }; ********** Build output ********** creating cache ./config.cache checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking for a BSD compatible install... /usr/bin/install -c checking for c++... c++ checking whether the C++ compiler (c++ ) works... yes checking whether the C++ compiler (c++ ) is a cross-compiler... no checking whether we are using GNU C++... yes checking whether c++ accepts -g... yes checking how to run the C++ preprocessor... c++ -E checking for Cygwin environment... no checking for mingw32 environment... no checking how to run the C preprocessor... cc -E checking host system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking for object suffix... o checking for executable suffix... no checking command to parse /usr/bin/nm -B output... ok checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether -lc should be explicitly linked in... no creating libtool checking for -fno-exceptions... yes checking for python... /usr/bin/python checking Python version... 2.1 checking for Python.h... /usr/include/python2.1 checking for lib-dynload... /usr/lib/python2.1 checking for sip.h... /usr/include/sip checking for -lsip... /usr/lib checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for moc... /usr/lib/qt2/bin/moc checking for qobject.h... /usr/lib/qt2/include checking for -lqt... /usr/lib/qt2/lib checking for dnet_ntoa in -ldnet... no checking for dnet_ntoa in -ldnet_stub... no checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for Qt version >= 230 and < 300... yes checking for Qt version >= 220... yes checking for Qt version >= 220... yes checking for OpenGL support in Qt... no - qtgl module will not be built updating cache ./config.cache creating ./config.status creating Makefile creating sip/Makefile creating config.h config.h is unchanged <<<<<< make >>>>>> cd . && autoheader make all-recursive make[1]: Entering directory `/home/john/projectspy/filecopy' Making all in sip make[2]: Entering directory `/home/john/projectspy/filecopy/sip' sip -I ../sip -I /usr/share/sip/qt -c . ../sip/MMM.sip touch rebuild-src c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-exceptions -O2 -c sip_helper.cpp /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/usr/lib/qt2/lib -lqt -lXext -L/usr/X11R6/lib -lSM -lICE -lX11 mkdir .libs c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/usr/lib/qt2/lib -lqt -lXext -L/usr/X11R6/lib -lSM -lICE -lX11 ./sip_helper >sipMMMVersion.h c++ -E -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include sipMMMProxyMMM.h >moc_sipMMMProxyMMM.h /usr/lib/qt2/bin/moc -o sipMMMProxyMMM.moc moc_sipMMMProxyMMM.h /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-exceptions -O2 -c MMMcmodule.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-exceptions -O2 -Wp,-MD,.deps/MMMcmodule.pp -c MMMcmodule.cpp -fPIC -DPIC -o MMMcmodule.lo /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-exceptions -O2 -c sipMMMCCC.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-exceptions -O2 -Wp,-MD,.deps/sipMMMCCC.pp -c sipMMMCCC.cpp -fPIC -DPIC -o sipMMMCCC.lo /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o libMMMcmodule.la -rpath /usr/lib/python2.1/site-packages -release 2.5 MMMcmodule.lo sipMMMCCC.lo -L/usr/lib/qt2/lib -L/usr/lib/python2.1/site-packages -lqtcmodule -L/usr/lib/qt2/lib -lsip -lqt -L/usr/X11R6/lib -lSM -lICE -lX11 rm -fr .libs/libMMMcmodule.la .libs/libMMMcmodule.* .libs/libMMMcmodule-2.5.* (cd . && ln -s MMMcmodule.lo MMMcmodule.o) (cd . && ln -s sipMMMCCC.lo sipMMMCCC.o) gcc -shared MMMcmodule.lo sipMMMCCC.lo -Wl,--rpath -Wl,/usr/lib/python2.1/site-packages -Wl,--rpath -Wl,/usr/lib/python2.1/site-packages -L/usr/X11R6/lib -L/usr/lib -L/usr/lib/qt2/lib -L/usr/lib/python2.1/site-packages /usr/lib/python2.1/site-packages/libqtcmodule.so /usr/lib/libsip.so -lqt -lSM -lICE -lX11 -Wl,-soname -Wl,libMMMcmodule-2.5.so -o .libs/libMMMcmodule-2.5.so (cd .libs && rm -f libMMMcmodule.so && ln -s libMMMcmodule-2.5.so libMMMcmodule.so) creating libMMMcmodule.la (cd .libs && rm -f libMMMcmodule.la && ln -s ../libMMMcmodule.la libMMMcmodule.la) make[2]: Leaving directory `/home/john/projectspy/filecopy/sip' make[2]: Entering directory `/home/john/projectspy/filecopy' make[2]: Leaving directory `/home/john/projectspy/filecopy' make[1]: Leaving directory `/home/john/projectspy/filecopy' From gvermeul at labs.polycnrs-gre.fr Sat Aug 18 22:30:46 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <200108182030.f7IKUbU02263@labs.polycnrs-gre.fr> > Hello > > I have the same problem that Joerg JKaercher reported 8 Jun 2001, unfortunatly his email conversation with Phil did not seem to come to any conclusion. So Im stuck. > > I compile my extension (source below) with no error, then get the following error when importing: > > Traceback (most recent call last): > File "MMM.py", line 6, in ? > import libMMMc > ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: __ti3CCC Hi John, I see at least one reason why: you did not link in a library or an object file containing code from CCC.cpp. A quick and dirty solution (just to see if it works) is to replace the following lines in your Makefile template (in the sip file) > MMM_SOURCES = \ > $S \ > MMM.py by MMM_SOURCE = \ CCC.cpp \ $S \ MMM.py and put CCC.cpp in the directory where sip puts its generated generated source code. Later, you could make a library out of CCC.cpp & friends, then you have to add a library libCCC.so to >lib$mcmodule_la_LIBADD = -L/usr/lib/qt2/lib -L$$(DESTDIR)$$(libdir) -lqtcmodule <- add libCCC.so (order of linking might be important). With such changes it might work. Since you are using libtool-1.4, I would advise you to remove the libqtcmodule-2.5.la file from /usr/lib/python2.1/site-packages/ (libtool-1.4 is much stricter than previous versions and imposes its own linking order -- this interferes order of initialization of static objects in C++ libraries -- you might get away with it this time, but expect erratic behaviour). [..] removed listings [..] Hope this helps, Gerard --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Sun Aug 19 15:17:50 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01081914161800.07619@localhost.localdomain> Hello Thanks for the help Gerard. I added: MMM_SOURCE = \ ? ? CCC.cpp \ ? ? $S \ ? ? MMM.py as suggested but get the same error: Traceback (most recent call last): ? File "MMM.py", line 6, in ? ? ? import libMMMc ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: __ti3CCC I changed to libtool 1.4 because someone said it might help. With libtool version 1.3.5 I get the following error: Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/site-packages/MMM.py", line 6, in ? import libMMMc ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: sipName_qt_destroyed So Im still stuck. From gvermeul at labs.polycnrs-gre.fr Sun Aug 19 17:31:46 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <200108191531.f7JFViU29295@labs.polycnrs-gre.fr> > Hello > > Thanks for the help Gerard. > > I added: > > MMM_SOURCE = \ > ? ? CCC.cpp \ > ? ? $S \ > ? ? MMM.py > > as suggested but get the same error: Did you generate a new Makefile.am, Makefile.in and Makefile (you have a ./configure script, I suppose?) The link step in the Makefile is unreadable. But if you rerun make, the one of the last steps should show something like gcc -shared CCC.lo CCCcmodule.lo ... CCC.lo should probably come first in a list of *.lo files. If not, please show the output from this step. Running your undefined symbol through c++filt (part of binutils) shows: [packer@voyager packer]$ c++filt __ti3CCC CCC type_info node indicating that you compiled with runtime type information enabled (-frtti) No problem, if it is done CONSISTINGLY (also your Qt libraries!). The CCC type_info node should be in CCC.o, try strings CCC.lo or strings CCC.lo | grep ti3CCC > > Traceback (most recent call last): > ? File "MMM.py", line 6, in ? > ? ? import libMMMc > ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: __ti3CCC > > I changed to libtool 1.4 because someone said it might help. With libtool version 1.3.5 I get the following error: > > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.1/site-packages/MMM.py", line 6, in ? > import libMMMc > ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: sipName_qt_destroyed > > So Im still stuck. > Go back to libtool-1.4. I am using that, but with precaution: Do you have /usr/lib/python2.1/site-packages/libqtcmodule*.la file? It is human readable, you see that it imposes a linking order. Delete it! Also /usr/lib/libsip*.la (all lib*.la files linking C++ code and having todo something with PyQt and imposing a linking order on C++ libraries). Gerard Vermeulen --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Mon Aug 20 03:44:13 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01082002415600.26759@localhost.localdomain> Hello Gerard Thanks again for all your help. I carefully went through your email and tried everything you said but no luck. 1. Yes, I generate a new Makefile.am etc. below is the script I use to pick up changes in MMM.sip. I used PyQy and qtgl project files as a starting point for autoconf/automake/configure stuff. 2. Yes I get "gcc -shared CCC.lo MMMcmodule.lo..." (you said CCCcmodule.lo ?) output shown below. 3. strings CCC.lo did not find __ti3CCC (NM lists it as U). 4. Dont know about rtti so I tried both ways, -frtti gives the __ti3CCC error. -fno-rtti gives (all listings below are with -fno-rtti): Python 2.1.1 (#5, Aug 19 2001, 13:52:21) [GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import MMM Traceback (most recent call last): File "", line 1, in ? File "MMM.py", line 6, in ? import libMMMc ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol: metaObject__C3CCC >>> 5. I Changed back to libtool 1.4 6. I deleted *.la in site-packages and /usr/lib/libsip*.la This is driving me mad. I thought if I started with a very simple example, it would be easy ! ********** c++filt output ********** [root@localhost filecopy]# c++filt metaObject__C3CCC CCC::metaObject(void) const ********** NM output ********** root@localhost sip]# nm -A -C CCC.lo CCC.lo: U QPushButton::~QPushButton(void) CCC.lo:00000090 T CCC::~CCC(void) CCC.lo: U QString::shared_null CCC.lo: U _GLOBAL_OFFSET_TABLE_ CCC.lo: U QPushButton::QPushButton(QString const &, QWidget *, char const *) CCC.lo:00000000 T CCC::CCC(QWidget *, char const *) CCC.lo: U QString::QString(char const *) CCC.lo: U __builtin_delete CCC.lo: U CCC virtual table CCC.lo: U CCC::QPaintDevice virtual table CCC.lo: U QStringData::deleteSelf(void) CCC.lo:00000000 t gcc2_compiled. CCC.lo: U QString::makeSharedNull(void) CCC.lo:00000130 T CCC::onButtonClicked(void) CCC.lo: U CCC::result(QString const &) CCC.lo:000000f0 T CCC::setNumber(QString const &) CCC.lo: U QString::sprintf(char const *,...) CCC.lo: U QString::toFloat(bool *) const [root@localhost sip]# ********** Build script ********** # Force full build echo "<<<<<< remove >>>>>>" rm -f config.cache rm -f ./sip/rebuild-src # Use sip to make Makefile.am echo "<<<<<< SIP Build Makefile.am >>>>>>" cd ./sip sip -I ../sip -I /usr/share/sip/qt -m Makefile.am MMM.sip cd .. echo "<<<<<< aclocal >>>>>>" aclocal echo "<<<<<< autoconf >>>>>>" autoconf echo "<<<<<< automake >>>>>>" automake echo "<<<<<< configure >>>>>>" ./configure --with-sip-library=/usr/lib --with-sip-include=/usr/include/sip --with-sip-install=/usr/share/sip/qt --with-qt-dir=/usr/lib/qt2 echo "<<<<<< make >>>>>>" make ********** Build output ********** <<<<<< remove >>>>>> <<<<<< SIP Build Makefile.am >>>>>> <<<<<< aclocal >>>>>> <<<<<< autoconf >>>>>> <<<<<< automake >>>>>> <<<<<< configure >>>>>> creating cache ./config.cache checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking for a BSD compatible install... /usr/bin/install -c checking for c++... c++ checking whether the C++ compiler (c++ ) works... yes checking whether the C++ compiler (c++ ) is a cross-compiler... no checking whether we are using GNU C++... yes checking whether c++ accepts -g... yes checking how to run the C++ preprocessor... c++ -E checking for Cygwin environment... no checking for mingw32 environment... no checking how to run the C preprocessor... cc -E checking host system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking for object suffix... o checking for executable suffix... no checking command to parse /usr/bin/nm -B output... ok checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether -lc should be explicitly linked in... no creating libtool checking for -fno-exceptions... yes checking for python... /usr/bin/python checking Python version... 2.1 checking for Python.h... /usr/include/python2.1 checking for lib-dynload... /usr/lib/python2.1 checking for sip.h... /usr/include/sip checking for -lsip... /usr/lib checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for moc... /usr/lib/qt2/bin/moc checking for qobject.h... /usr/lib/qt2/include checking for -lqt... /usr/lib/qt2/lib checking for dnet_ntoa in -ldnet... no checking for dnet_ntoa in -ldnet_stub... no checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for Qt version >= 230 and < 300... yes checking for Qt version >= 220... yes checking for Qt version >= 220... yes checking for OpenGL support in Qt... no - qtgl module will not be built updating cache ./config.cache creating ./config.status creating Makefile creating sip/Makefile creating config.h config.h is unchanged <<<<<< make >>>>>> cd . && autoheader make all-recursive make[1]: Entering directory `/home/john/projectspy/filecopy' Making all in sip make[2]: Entering directory `/home/john/projectspy/filecopy/sip' /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -c CCC.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -Wp,-MD,.deps/CCC.pp -c CCC.cpp -fPIC -DPIC -o CCC.lo sip -I ../sip -I /usr/share/sip/qt -c . ../sip/MMM.sip touch rebuild-src c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -c sip_helper.cpp /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/usr/lib/qt2/lib -lqt -lXext -L/usr/X11R6/lib -lSM -lICE -lX11 mkdir .libs c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/usr/lib/qt2/lib -lqt -lXext -L/usr/X11R6/lib -lSM -lICE -lX11 ./sip_helper >sipMMMVersion.h c++ -E -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include sipMMMProxyMMM.h >moc_sipMMMProxyMMM.h /usr/lib/qt2/bin/moc -o sipMMMProxyMMM.moc moc_sipMMMProxyMMM.h /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -c MMMcmodule.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -Wp,-MD,.deps/MMMcmodule.pp -c MMMcmodule.cpp -fPIC -DPIC -o MMMcmodule.lo /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -c sipMMMCCC.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -Wp,-MD,.deps/sipMMMCCC.pp -c sipMMMCCC.cpp -fPIC -DPIC -o sipMMMCCC.lo /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o libMMMcmodule.la -rpath /usr/lib/python2.1/site-packages -release 1.0 CCC.lo MMMcmodule.lo sipMMMCCC.lo -L/usr/lib/python2.1/site-packages -lqtcmodule -L/usr/lib/qt2/lib -lsip -lqt -L/usr/X11R6/lib -lSM -lICE -lX11 rm -fr .libs/libMMMcmodule.la .libs/libMMMcmodule.* .libs/libMMMcmodule-1.0.* (cd . && ln -s CCC.lo CCC.o) (cd . && ln -s MMMcmodule.lo MMMcmodule.o) (cd . && ln -s sipMMMCCC.lo sipMMMCCC.o) gcc -shared CCC.lo MMMcmodule.lo sipMMMCCC.lo -L/usr/lib/python2.1/site-packages -lqtcmodule -L/usr/lib/qt2/lib -lsip -lqt -L/usr/X11R6/lib -lSM -lICE -lX11 -Wl,-soname -Wl,libMMMcmodule-1.0.so -o .libs/libMMMcmodule-1.0.so (cd .libs && rm -f libMMMcmodule.so && ln -s libMMMcmodule-1.0.so libMMMcmodule.so) creating libMMMcmodule.la (cd .libs && rm -f libMMMcmodule.la && ln -s ../libMMMcmodule.la libMMMcmodule.la) make[2]: Leaving directory `/home/john/projectspy/filecopy/sip' make[2]: Entering directory `/home/john/projectspy/filecopy' make[2]: Leaving directory `/home/john/projectspy/filecopy' make[1]: Leaving directory `/home/john/projectspy/filecopy' Bye... ********** MMM.sip ********** // --------------------------------------------------------------- // This is the SIP interface definition for the MMM module. // Based on qtgl.sip // --------------------------------------------------------------- %Module MMM %Import qt.sip %Include CCC.sip %VersionCode #include %End %Makefile Makefile.am .o # Makefile for building MMM with autoconf/automake/libtool. MMM_SOURCES = \ CCC.cpp \ $S \ MMM.py SIP_FILES = \ CCC.sip \ MMM.sip noinst_PROGRAMS = sip_helper sip_helper_SOURCES = sip_helper$c sip_helper_LDADD = $$(SIP_LDLIBDIRS) -lqt -lXext $$(SIP_LDXFLAGS) # --------------------------------------------------------------- # rebuild-src (dummy file) depends on sipjjProxyjj.h so that sip will be called # --------------------------------------------------------------- sipMMMProxyMMM.h: rebuild-src # --------------------------------------------------------------- # sip outputs c++ files from 'SIP interface definition' files # --------------------------------------------------------------- rebuild-src: $$(SIP_FILES) sip -I ../sip -I $$(SIP_SIPINSTALLDIR) -c . ../sip/MMM.sip touch rebuild-src sipMMMDeclMMM.h: sipMMMVersion.h sipMMMVersion.h: sip_helper ./sip_helper >sipMMMVersion.h # --------------------------------------------------------------- # MOC stuff # sipMMMProxyMMM.moc is included by MMMcmodule.cpp (thats how it gets compiled) # --------------------------------------------------------------- MMMcmodule.cpp: sipMMMProxyMMM.moc sipMMMProxyMMM.moc: sipMMMProxyMMM.h sipMMMVersion.h $$(CXXCPP) $$(SIP_CPPFLAGS) sipMMMProxyMMM.h >moc_sipMMMProxyMMM.h $$(SIP_MOC) -o sipMMMProxyMMM.moc moc_sipMMMProxyMMM.h CLEANFILES = \ MMM.pyc sip_helper sipMMMVersion.h sipMMMProxyMMM.moc \ moc_sipMMMProxyMMM.h sip* Makefile* MMM.py MMMcmodule* rebuild-src AM_CPPFLAGS = $$(SIP_CPPFLAGS) -fno-rtti AM_CXXFLAGS = $$(SIP_CXXFLAGS) libdir = $$(SIP_PYTHONDLMODULES) datadir = $$(SIP_PYTHONMODULES) data_DATA = MMM.py lib_LTLIBRARIES = lib$mcmodule.la lib$mcmodule_la_SOURCES = $$(MMM_SOURCES) lib$mcmodule_la_LDFLAGS = -release 1.0 lib$mcmodule_la_LIBADD = -L$$(DESTDIR)$$(libdir) -lqtcmodule $$(SIP_LDLIBDIRS) -lsip -lqt $$(SIP_LDXFLAGS) install-data-hook: (cd /tmp; PYTHONPATH=$$(DESTDIR)$$(datadir):$$(DESTDIR)$$(libdir) $$(PYTHONINTERP) -O -c "import MMM") %End From gvermeul at labs.polycnrs-gre.fr Mon Aug 20 17:36:32 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <200108201536.f7KFaNu25335@labs.polycnrs-gre.fr> Hi Jon, > Hello Gerard > > Thanks again for all your help. > > I carefully went through your email and tried everything you said but no luck. > I have no real ideas, only a few suggestions: > 1. Yes, I generate a new Makefile.am etc. below is the script I use [...] I don't know if it matters, but I would add libtoolize --copy --force before the aclocal stuff. Especially, since you swapped libtool a few times. > > 2. Yes I get "gcc -shared CCC.lo MMMcmodule.lo..." (you said CCCcmodule.lo ?) output shown below. > > 3. strings CCC.lo did not find __ti3CCC (NM lists it as U). > Yep, typo, MMMcmodule.lo. On my system, strings does not show the __ > 4. Dont know about rtti so I tried both ways, -frtti gives the __ti3CCC error. -fno-rtti gives (all listings below are with -fno-rtti): > With respect to -frtti: it is best stay in line with the Mandrake RPMS(?). You have Qt-2.3.1 or 2.3.0? Look in the *.spec file in the SRPMS. [...] > > This is driving me mad. I thought if I started with a very simple example, it would be easy ! > One last point: in the line lib$mcmodule_la_LIBADD = -L$$(DESTDIR)$$(libdir) -lqtcmodule $$(SIP_LDLIBDIRS) -lsip -lqt $(SIP_LDXFLAGS) I would put -lqtcmodule at the end (nevertheless PyQtgl works on my system). [...] I am working on a distutils-setup.py script for my PyQwt bindings (a much smaller and simplified version of Thomas Malik's setup scripts - see this Mailing List June/July). It is working now on my system - Mandrake-7.2/Python-2.1.1 (with small bug fix of distutils.UnixCCompiler.py). The libqwtcmodule.so generated by distutils is half the size of the version generated by autoconf/configure/libtool. BUT, it WORKS! (I want to add a few work arounds for bugs and/or missing features in distutils) It might help you, but no guarantees. Gerard --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Tue Aug 21 01:00:04 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01082023595000.01337@localhost.localdomain> Hello Gerard Tried your final suggestions, no luck Im afraid. I wonder if its a Mandrake 8.0 thing. Is there a reason you have stayed at 7.2 ? Has anyone else had problems with Mandrake 8.0 and SIP ? Thanks for all your help. From gvermeul at labs.polycnrs-gre.fr Tue Aug 21 12:05:48 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <200108211005.f7LA5fY29466@labs.polycnrs-gre.fr> Hi John > > Tried your final suggestions, no luck Im afraid. > > I wonder if its a Mandrake 8.0 thing. Is there a reason you have stayed at 7.2 ? There are several reasons: (1) I have a bi-pentium (Asus CUV4X-D) which refuses to run the SMP kernel coming with Mandrake-8.0. It might be bad hardware (the Mandrake security upgraded kernel 2.2.19 does not work either). (2) I run several machines, at work and at home and sticking at one version simplifies life. Also, I know Mandrake-7.2 very well (tweaked the startup scripts) (3) I played with Mandrake-8.0, see below. Of course it is very user friendly, but feels slow! Reason might be that gcc-2.96 is less stable than gcc-2.95. Therefore Mandrake-8.0 has been compiled with optimization -O2 instead of -O3 as is the case with Mdk-7.2. In the good old days, they used -O5! > > Has anyone else had problems with Mandrake 8.0 and SIP ? Well, I installed Mandrake 8.0 Frequent Update 1 on a machine to which I have no access right now. I think, that I installed my PyQwt extensions (with sip-2.4), but I am not quite sure. > > Thanks for all your help. > Well, to see how portable is my (distutils-)setup.py script, I will test it on your CCC extension. I let you know, if/when it works, tell me if you want to test it on your setup. Gerard --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From gvermeul at labs.polycnrs-gre.fr Tue Aug 21 15:15:49 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP -- found solution Message-ID: <200108211315.f7LDFgR13999@labs.polycnrs-gre.fr> > Hello Gerard > > Tried your final suggestions, no luck Im afraid. > > I wonder if its a Mandrake 8.0 thing. Is there a reason you have stayed at 7.2 ? > Hello Jon, No, it is no Mandrake 8.0 thing. It's you -- or us :-) I tried to compile your extension with my distutils script. Initially, I got the same error: undefined symbol __ti3CCC. Then I realized that you should run the moc compiler on CCC.h to generate moc_CCC.cpp, compile the cpp file and link it to libMMMcmodule.so. So, I added the option to pass a list of header files, defining classes derived from the Qt-hierarchy to setup.py. It works, now I can import MMM. If you like, I can put a *.tar.gz in ftp://old-labs.polycnrs-gre.fr/pub/SAS/Vermeulen which is accessible by anonymous ftp. I will also include the small patch for the Python-2.1.1 distutils. Gerard PS: it is certainly possible to adapt the Makefile.am template, but I prefer to hack python instead of autoconf/automake/libtool stuff. If you use libraries with classes derived from Qt, you don't run in this problem, because moc has been run already. PPS: leave me a little time, but the tar.gz should be there within one hour. --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Tue Aug 21 20:16:29 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01082119160500.22803@localhost.localdomain> Hello Gerard I finally got it working last night. In fact the real problem was solved when you said to do -fno-rtti (the __ti3CCC error). Mandrake 8 needs this. The remaining problem (the metaObject error) was that I was not running moc on CCC.cpp but I was so tied up with the sip problems that it took a while to realise this. What I finally did (again at your suggestion) is build the CCC class separately into a shared library and then link with my sip bindings and everything sprang into life. Wonderful... ohh Ive just seen your latest email and you have already found the moc problem. Thanks very much for all your help with this problem. Ill now go and have some fun actually using sip to do something useful. From gvermeul at labs.polycnrs-gre.fr Tue Aug 21 23:30:59 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <200108212130.f7LLUpR14951@labs.polycnrs-gre.fr> Hello Jon, > Hello Gerard > > I finally got it working last night. > > In fact the real problem was solved when you said to do -fno-rtti (the __ti3CCC error). Mandrake 8 needs this. > Great, but I don't believe your statement about -fno-rtti very much (sorry). Disappearence of the __ti3CCC error was related to running moc on my system. Please, could you return me a favor? Get ftp://old-labs.polycnrs-gre.fr/pub/SAS/Vermeulen/PyMMM-0.0.1.tar.gz and try to see if it builds and if you can run the program in the examples directory. (The README.txt explains how to patch Python-2.1.1/distutils). It will help me to release the next version of PyQwt (python bindings for the Scientific and Engineering -- fast plotting of NumPy arrays -- Qwt Library, see http://gerard.vermeulen.free.fr ) with distutils. All you have to do is unpack the tar.gz, add one line to /usr/lib/python2.1/distutils/unixccompiler (I think that the the preprocess() function has never been used or tested and it has not implemented for MicroSoft Visual C), type python setup build_ext python examples/xmmm.py and tell me if it works. The advantages of distutils with respect to automake/autoconf/libtool are (1) smaller *.tar.gz archives (PyQwt would go from 250 kbyte to less than 100 kbyte -- the Gnu utilities eat a lot of disk space) (2) smaller library size -- don't know why -- but PyQwt goes down from about 200 kbyte to 100 kbyte (3) easier to program -- distutils feels still a little bit rough (it is clear that nobody used the preprocess function), but is certainly easier to understand than automake/autoconf/libtool. (4) tell your friends that you are using something better (simpler!) than the Gnu setup tools. I have still another question related to my posting on sip-generated code, that does not compile. I encountered the same problem with your CCC class. Are you using sip-2.5? I mean, really 2.5 and not 2.5preX. Please check with sip -V. Because, I had to post-process the sip-generated code (done automatically by setup.py) to make it compile. CAVEAT-1: PyMMM-0.0.1.tar.gz requires sip-2.5. CAVEAT-2: the link to PyMMM-0.0.1.tar.gz stays alive untill this weekend ('sas' is a french word for airlock, and pub/SAS gets wiped weekly). > The remaining problem (the metaObject error) was that I was not running moc on CCC.cpp but I was so tied up with the sip problems that it took a while to realise this. > > What I finally did (again at your suggestion) is build the CCC class separately into a shared library and then link with my sip bindings and everything sprang into life. > > Wonderful... > setup.py also handles the case if CCC is not part of a shared library. Thanks in advance -- Gerard --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From gvermeul at labs.polycnrs-gre.fr Tue Aug 21 23:31:06 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <200108212131.f7LLV1R14959@labs.polycnrs-gre.fr> Hello Jon, > Hello Gerard > > I finally got it working last night. > > In fact the real problem was solved when you said to do -fno-rtti (the __ti3CCC error). Mandrake 8 needs this. > Great, but I don't believe your statement about -fno-rtti very much (sorry). Disappearence of the __ti3CCC error was related to running moc on my system. Please, could you return me a favor? Get ftp://old-labs.polycnrs-gre.fr/pub/SAS/Vermeulen/PyMMM-0.0.1.tar.gz and try to see if it builds and if you can run the program in the examples directory. (The README.txt explains how to patch Python-2.1.1/distutils). It will help me to release the next version of PyQwt (python bindings for the Scientific and Engineering -- fast plotting of NumPy arrays -- Qwt Library, see http://gerard.vermeulen.free.fr ) with distutils. All you have to do is unpack the tar.gz, add one line to /usr/lib/python2.1/distutils/unixccompiler (I think that the the preprocess() function has never been used or tested and it has not implemented for MicroSoft Visual C), type python setup build_ext python examples/xmmm.py and tell me if it works. The advantages of distutils with respect to automake/autoconf/libtool are (1) smaller *.tar.gz archives (PyQwt would go from 250 kbyte to less than 100 kbyte -- the Gnu utilities eat a lot of disk space) (2) smaller library size -- don't know why -- but PyQwt goes down from about 200 kbyte to 100 kbyte (3) easier to program -- distutils feels still a little bit rough (it is clear that nobody used the preprocess function), but is certainly easier to understand than automake/autoconf/libtool. (4) tell your friends that you are using something better (simpler!) than the Gnu setup tools. I have still another question related to my posting on sip-generated code, that does not compile. I encountered the same problem with your CCC class. Are you using sip-2.5? I mean, really 2.5 and not 2.5preX. Please check with sip -V. Because, I had to post-process the sip-generated code (done automatically by setup.py) to make it compile. CAVEAT-1: PyMMM-0.0.1.tar.gz requires sip-2.5. CAVEAT-2: the link to PyMMM-0.0.1.tar.gz stays alive untill this weekend ('sas' is a french word for airlock, and pub/SAS gets wiped weekly). > The remaining problem (the metaObject error) was that I was not running moc on CCC.cpp but I was so tied up with the sip problems that it took a while to realise this. > > What I finally did (again at your suggestion) is build the CCC class separately into a shared library and then link with my sip bindings and everything sprang into life. > > Wonderful... > setup.py also handles the case if CCC is not part of a shared library. Thanks in advance -- Gerard --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Wed Aug 22 00:39:17 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01082123384500.06792@localhost.localdomain> Hello Gerard Must admit I did not bother to go back and prove what I said about -fno-rtti, anyway its working. Yes Il be happy to return the favor, but Im not on sip-2.5 so it will take a little time. I tried PyQt 2.5 and Sip2.5 about a week ago and had problems, but Ill try it again (Ive learned alot in that week). Ill download ftp://old-labs.polycnrs-gre.fr/pub/SAS/Vermeulen/PyMMM-0.0.1.tar.gz now and get back to you ASAP. I have spent tonight trying to integrate the sip stuff into a KDE Studio Gold project as this where I do all my c++ programming. Once thats complete I should have a nice environment to work in. From jjhome at fire-bug.co.uk Wed Aug 22 02:40:18 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Help needed with SIP Message-ID: <01082201394100.07126@localhost.localdomain> Hello Gerard I upgraded to PyQt 2.5 and SIP 2.5. Heres what I got. As you can see python setup.py build_ext gave an error. [john@localhost PyMMM-0.0.1]$ python setup.py build_ext running build_ext generating MMM/MMM.py from sip/MMM.sip, sip/CCC.sip /usr/bin/sip -I sip -I /usr/share/sip/qt -c MMM -t Qt_2_3_0 sip/MMM.sip ...fixing by means of fixmmm.fix(dir, name) ...fixing the sip include bugs g++ -g -O2 -Wall -Wstrict-prototypes -fno-exceptions -fPIC -I/usr/lib/qt2/include -I/usr/include/sip -I/home/john/src/PyMMM-0.0.1/MMM -I/usr/include/python2.1 -c MMM/s ip_helper.cpp -o sip_helper.o g++ sip_helper.o -L/usr/lib/python2.1/site-packages -o MMM/sip_helper "MMM/sip_helper" has made "MMM/sipMMMVersion.h" g++ -E -I/usr/include/python2.1 -o MMM/moc_sipMMMProxyMMM.h g++: No input files error: command 'g++' failed with exit status 1 Same with --force on the end. If I run python setup.py build_ext again I get this: [john@localhost PyMMM-0.0.1]$ python setup.py build_ext running build_ext skipping MMM/MMM.py (inputs unchanged) building 'libMMMcmodule' extension error: file 'MMM/moc_CCC.cpp' does not exist till I manually delete stuff to force a full rebuild. and trying to run the example gives: [john@localhost PyMMM-0.0.1]$ python examples/xmmm.py Traceback (most recent call last): File "examples/xmmm.py", line 17, in ? from MMM import * ImportError: No module named MMM I checked all the variables in setup.py and they did not need changing. Am I doing something stupid ? You said the readme explains the patch. It mentions a patch but does not say what to do to apply it. I have not been doing Linux for long so I need dummy instructions for this ? Does running python setup.py build_ext apply the patch ? From gvermeul at labs.polycnrs-gre.fr Wed Aug 22 13:46:47 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] distutils for SIP extensions (=Help needed with SIP) Message-ID: <200108221146.f7MBkcR08208@labs.polycnrs-gre.fr> Hello Jon, Thanks for trying, it does indeed not work because you did not apply the patch. > Hello Gerard > > I upgraded to PyQt 2.5 and SIP 2.5. Heres what I got. > [...] > "MMM/sip_helper" has made "MMM/sipMMMVersion.h" > g++ -E -I/usr/include/python2.1 -o MMM/moc_sipMMMProxyMMM.h > g++: No input files > error: command 'g++' failed with exit status 1 > This is due to the distutils.UnixCCompiler.preprocess() bug [...] > > [john@localhost PyMMM-0.0.1]$ python examples/xmmm.py > Traceback (most recent call last): > File "examples/xmmm.py", line 17, in ? > from MMM import * > ImportError: No module named MMM > Of course, it does not work because the build_ext failed [...] > > You said the readme explains the patch. It mentions a patch but does not say what to do to apply it. I have not been doing Linux for long so I need dummy instructions for this ? > Oh, sorry, I assumed that you knew how to apply the patch. In fact all information is in the patch. A patch is human readible. I would proceed like this (assuming that you are in the directory containing Python-2.1.1.patch): cp /usr/lib/python2.1/distutils/unixccompiler.py . patch -p5 -b -z .distutils Hi there. This is the first time i port to you and i'm afraid this question already had been answered. Newbie as I am, I hope y'all have patience. I have ripped this code from a post by phil: <--------------------------------------------------------------------------------------- From: Phil Thompson Subject: Re: [PyKDE] Help with QListViewItem Date: Thu, 14 Sep 2000 01:31:08 -0700 Per Gummedal wrote: > > I have this simple source. > > #!/usr/bin/env python > > import string, sys > from qt import * > > class List(QListView): > def __init__(self, *args): > apply(QListView.__init__,(self,) + args) > self.addColumn("A") > self.addColumn("B") > self.setShowSortIndicator(1); > self.data = (['1','2'], ['11','12'],['2','3']) self.itemList = [] # ADD THIS > for row in self.data: > item = ListItem(self) self.itemList.append(item) # ADD THIS > for i in range(len(row)): > item.setText(i, row[i]) > > class ListItem(QListViewItem): > def __init__(self, *args): > apply(QListViewItem.__init__,(self,) + args) > > def key(self, col, asc): > print 'key' > return string.rjust(str(self.text(col)),2) # CHANGE THIS > > a = QApplication(sys.argv) > mw = List() > a.setMainWidget(mw) > mw.show() > a.exec_loop() > > When I click on the columnheaders to sort, method key is not called. > What am I doing wrong, any ideas ? Make the changes I've identified above. When you call ListItem(self) a Python ListItem instance is created and a Qt QListViewItem instance is created. Qt takes responsibility for deleting the QListViewItem instance. The ListItem instance is deleted as soon as there is no Python reference to it - in your script the first instance is deleted when you create the second one, and the second one is deleted when the List __init__ method terminates. There is therefore no ListItem instance to provide a key() method. The trick is to keep the ListItem instances alive by keeping references to them in the itemList list. Phil _______________________________________________ PyKDE mailing list PyKDE@mats.gmd.de http://mats.gmd.de/mailman/listinfo/pykde <-------------------------------------------------------------------------------------- This kind of sorting is _almost_ what i want. The only difference is that my list contains: > self.data = (['a 1','a 2'], ['a 11','a 12'],['a 2','a 3']) (it is a cuple of charachters before the number.) can i sort by numbers anyway? > return string.rjust(str(self.text(col)),2) # CHANGE THIS maybe modify the str(self.text(col)) with an regExp or something to force to sort by numbers? Best regards, Teodor From jjl at pobox.com Wed Aug 22 21:54:43 2001 From: jjl at pobox.com (John J. Lee) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] QInputDialog.getText() AttributeError Message-ID: Anybody else get an AttributeError (something relating to the familiar sipThis) on using QInputDialog.getText() more than once? I just tried to make a short bit of code to demonstrate the problem, but it goes away when I do that, so I suspect it may be a bug in my code. I've replaced it with a Python class easily enough, but thought I'd check to see if it's worth trying to track down the problem. John From jjhome at fire-bug.co.uk Wed Aug 22 22:02:56 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] distutils for SIP extensions (=Help needed with SIP) Message-ID: <01082221021600.02301@localhost.localdomain> Hello Gerard Did the patch according to your instructions without any problems. Now get this: [john@localhost PyMMM-0.0.2]$ python setup.py build_ext running build_ext generating MMM/MMM.py from sip/MMM.sip, sip/CCC.sip /usr/bin/sip -I sip -I /usr/share/sip/qt -c MMM -t Qt_2_3_0 sip/MMM.sip ...fixing by means of fixmmm.fix(dir, name) ...fixing the sip include bugs g++ -g -O2 -Wall -Wstrict-prototypes -fno-exceptions -fPIC -I/usr/lib/qt2/include -I/usr/include/sip -I/home/john/src/PyMMM-0.0.2/MMM -c MMM/sip_helper.cpp -o sip_helper.o g++ sip_helper.o -o MMM/sip_helper "MMM/sip_helper" has made "MMM/sipMMMVersion.h" /usr/lib/qt2/bin/moc -o MMM/sipMMMProxyMMM.moc MMM/sipMMMProxyMMM.h "/usr/lib/qt2/bin/moc" has made "MMM/sipMMMProxyMMM.moc" /usr/lib/qt2/bin/moc MMM/CCC.h -o MMM/moc_CCC.cpp "/usr/lib/qt2/bin/moc" has made "MMM/moc_CCC.cpp" building 'libMMMcmodule' extension skipping MMM/CCC.cpp (build/temp.linux-i686-2.1/CCC.o up-to-date) g++ -g -O2 -Wall -Wstrict-prototypes -fno-exceptions -fPIC -I/usr/lib/qt2/include -I/usr/include/sip -I/home/john/src/PyMMM-0.0.2/MMM -I/usr/include/python2.1 -c MMM/moc_CCC.cpp -o build/temp.linux-i686-2.1/moc_CCC.o g++ -g -O2 -Wall -Wstrict-prototypes -fno-exceptions -fPIC -I/usr/lib/qt2/include -I/usr/include/sip -I/home/john/src/PyMMM-0.0.2/MMM -I/usr/include/python2.1 -c MMM/MMMcmodule.cpp -o build/temp.linux-i686-2.1/MMMcmodule.o g++ -g -O2 -Wall -Wstrict-prototypes -fno-exceptions -fPIC -I/usr/lib/qt2/include -I/usr/include/sip -I/home/john/src/PyMMM-0.0.2/MMM -I/usr/include/python2.1 -c MMM/sipMMMCCC.cpp -o build/temp.linux-i686-2.1/sipMMMCCC.o g++ -shared build/temp.linux-i686-2.1/CCC.o build/temp.linux-i686-2.1/moc_CCC.o build/temp.linux-i686-2.1/MMMcmodule.o build/temp.linux-i686-2.1/sipMMMCCC.o -L/usr/lib/qt2/lib -Lbuild/lib.linux-i686-2.1 -L/usr/lib/python2.1/site-packages -lsip -lqt -lqtcmodule -o build/lib.linux-i686-2.1/libMMMcmodule.so copying MMM/MMM.py -> build/lib.linux-i686-2.1 byte-compiling build/lib.linux-i686-2.1/MMM.py to MMM.pyc [john@localhost PyMMM-0.0.2]$ [john@localhost PyMMM-0.0.2]$ [john@localhost PyMMM-0.0.2]$ [john@localhost PyMMM-0.0.2]$ python examples/xmmm.py Traceback (most recent call last): File "examples/xmmm.py", line 17, in ? from MMM import * ImportError: No module named MMM [john@localhost PyMMM-0.0.2]$ My autoconf project (which builds and works with PyQt2.4 and sip2.4) gives the following errors on PyQt2.5 and sip2.5. Thats why I went back to 2.4 ??? <<<<<< make >>>>>> cd . && autoheader make all-recursive make[1]: Entering directory `/home/john/projectspy/filecopy' Making all in sip make[2]: Entering directory `/home/john/projectspy/filecopy/sip' sip -I ../sip -I /usr/share/sip/qt -c . ../sip/MMM.sip touch rebuild-src c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include - fno-rtti -fno-exceptions -O2 -c sip_helper.cpp /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/usr/lib/qt2/lib -lqt -lXext -L/usr/X1 1R6/lib -lSM -lICE -lX11 c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/usr/lib/qt2/lib -lqt -lXext -L/usr/X11R6/lib -lSM -lICE -lX11 ./sip_helper >sipMMMVersion.h c++ -E -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include sipMMMProxyMMM.h >moc_sipMMM ProxyMMM.h /usr/lib/qt2/bin/moc -o sipMMMProxyMMM.moc moc_sipMMMProxyMMM.h /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/q t2/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -O2 -c MMMcmodule.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fn o-rtti -fno-exceptions -O2 -Wp,-MD,.deps/MMMcmodule.pp -c MMMcmodule.cpp -fPIC -DPIC -o MMMcmodule.lo In file included from sipqtQMenuBar.h:21, from sipqtQMainWindow.h:11, from sipqtQToolBar.h:10, from sipqtQToolButton.h:12, from sipqtQStyle.h:19, from sipqtQWidget.h:22, from sipqtQPixmap.h:15, from sipqtQVariant.h:13, from sipqtQObject.h:12, from sipMMMJJEncryption.h:9, from MMMcmodule.cpp:7: sipqtQPopupMenu.h:78: `QTabletEvent' was not declared in this scope sipqtQPopupMenu.h:78: parse error before `)' sipqtQPopupMenu.h:79: `QIMEvent' was not declared in this scope sipqtQPopupMenu.h:79: parse error before `)' sipqtQPopupMenu.h:80: `QIMEvent' was not declared in this scope sipqtQPopupMenu.h:80: parse error before `)' sipqtQPopupMenu.h:81: `QIMEvent' was not declared in this scope sipqtQPopupMenu.h:81: parse error before `)' sipqtQPopupMenu.h:82: `QContextMenuEvent' was not declared in this etc... From gvermeul at labs.polycnrs-gre.fr Thu Aug 23 01:08:30 2001 From: gvermeul at labs.polycnrs-gre.fr (gvermeul@labs.polycnrs-gre.fr) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] distutils for SIP extensions (=Help needed with SIP) Message-ID: <200108222308.f7MN8RR21555@labs.polycnrs-gre.fr> Hello Jon, Pretty sure that everything went OK with distutils. You just slipped in the last step. Your going back from 2.5 to 2.4 is because of a code generation bug in sip-2.5. This is been fixed automatically by my scripts. > > Did the patch according to your instructions without any problems. > Patch is not really necessary for PyMMM-0.0.2, but does no harm. > Now get this: > > [john@localhost PyMMM-0.0.2]$ python setup.py build_ext > running build_ext > generating MMM/MMM.py from sip/MMM.sip, sip/CCC.sip > /usr/bin/sip -I sip -I /usr/share/sip/qt -c MMM -t Qt_2_3_0 sip/MMM.sip > ....fixing by means of fixmmm.fix(dir, name) > ....fixing the sip include bugs Here, the sip's code generation bug gets fixed (by tools/fixmmm.py in PyMMM-O.O.2. [...] > g++ -shared build/temp.linux-i686-2.1/CCC.o build/temp.linux-i686-2.1/moc_CCC.o build/temp.linux-i686-2.1/MMMcmodule.o build/temp.linux-i686-2.1/sipMMMCCC.o -L/usr/lib/qt2/lib -Lbuild/lib.linux-i686-2.1 -L/usr/lib/python2.1/site-packages -lsip -lqt -lqtcmodule -o build/lib.linux-i686-2.1/libMMMcmodule.so > copying MMM/MMM.py -> build/lib.linux-i686-2.1 > byte-compiling build/lib.linux-i686-2.1/MMM.py to MMM.pyc OK [...] > [john@localhost PyMMM-0.0.2]$ python examples/xmmm.py > Traceback (most recent call last): > File "examples/xmmm.py", line 17, in ? > from MMM import * > ImportError: No module named MMM > [john@localhost PyMMM-0.0.2]$ You did not follow the instructions (same happens to me when I repeat your commands). You should have done: cd examples python xmmm.py Reason is that xmmm.py tries to locate MMM.py by trying to find ./build/lib.*/libMMMcmodule* to adapt sys.path (assuming MMM.py is in the same directory). This does not work from PyMMM-0.0.2, but does from PyMMM-0.0.2/examples. The problem is related to the sip-2.5 code generation bug. I understand that for you it is a show stopper. I think I can fix it rather easily by creating a python script fixyourstuff.py (along the line of PyMMM-0.0.2/tools/fixmmm.py (or fixqwt.py <- but that does more) and adapting your Makefile template as indicated below. > My autoconf project (which builds and works with PyQt2.4 and sip2.4) gives the following errors on PyQt2.5 and sip2.5. Thats why I went back to 2.4 ??? > > <<<<<< make >>>>>> > cd . && autoheader > make all-recursive > make[1]: Entering directory `/home/john/projectspy/filecopy' > Making all in sip > make[2]: Entering directory `/home/john/projectspy/filecopy/sip' > sip -I ../sip -I /usr/share/sip/qt -c . ../sip/MMM.sip Insert here in your Makefile template (for 2.5): python ../tools/fixyourstuff.py > touch rebuild-src > c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip [...] > c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1 -I/usr/include/sip -I/usr/lib/qt2/include -I/usr/X11R6/include -fn > o-rtti -fno-exceptions -O2 -Wp,-MD,.deps/MMMcmodule.pp -c MMMcmodule.cpp -fPIC -DPIC -o MMMcmodule.lo > In file included from sipqtQMenuBar.h:21, > from sipqtQMainWindow.h:11, > from sipqtQToolBar.h:10, > from sipqtQToolButton.h:12, > from sipqtQStyle.h:19, > from sipqtQWidget.h:22, > from sipqtQPixmap.h:15, > from sipqtQVariant.h:13, > from sipqtQObject.h:12, > from sipMMMJJEncryption.h:9, > from MMMcmodule.cpp:7: > sipqtQPopupMenu.h:78: `QTabletEvent' was not declared in this scope So adapting fixmmm.py, the todo list in 'fix()' should start with todo = [('sipqtQPopupMenu.h', 'header-file-for-QTableEvent', 'first-header-file-in-list')] This smells real dirty hacking (for PyQwt, I had to do it in two places). Also your problem looks different compared to mine. Maybe there is a real solution to this problem. Maybe it is better to give up on 2.5 and stick with 2.4 (at least that is my advice, until you gain more experience or really need one of the new features in PyQt/sip-2.5). I am afraight that for PyQwt I will have to support sip-2.4 and 2.5 ;-( and for PyMMM/distutils also. In any case thanks for your help - I learned something Gerard --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ From jjhome at fire-bug.co.uk Thu Aug 23 01:37:46 2001 From: jjhome at fire-bug.co.uk (Jon) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] distutils for SIP extensions (=Help needed with SIP) Message-ID: <01082300370000.13102@localhost.localdomain> Hello Gerard Ill go back to 2.4. It works for me. Bye... From Mariusz.Kowalczyk at genfys.slu.se Thu Aug 23 09:23:40 2001 From: Mariusz.Kowalczyk at genfys.slu.se (Mariusz Kowalczyk) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] HP-UX 10.20 runtime error Message-ID: <01082309160300.06180@mkowalczyk.genfys.slu.se> Hi, With PyQt 2.5 on HP-UX 10.20 I've got something like this: $ python Python 2.1 (#1, Aug 21 2001, 10:37:58) [GCC 2.95.3 20010315 (release)] on hp-uxB Type "copyright", "credits" or "license" for more information. >>> from qt import * Traceback (most recent call last): File "", line 1, in ? File "/opt/python/lib/python2.1/site-packages/qt.py", line 1085, in ? libqtc.sipRegisterClasses() RuntimeError: Attempt to create a Python instance for a NULL pointer >>> Any ideas how to fix this? I am using qt-2.3.1, sip+PyQt 2.5, everything freshly compiled with gcc-2.95.3. Regards, MK From henrik.motakef at web.de Thu Aug 23 11:38:46 2001 From: henrik.motakef at web.de (Henrik Motakef) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Problems with QWMatrix and QCanvasView Message-ID: <200108231144.f7NBiBp17657@mailgate3.cinetic.de> Hi, I want to create a QCanvasView which shows a "zoomed" version of it's Canvas. What I tried looked like this: class ZoomedCanvasView(QCanvasView): def __init__(self, canvas, parent): QCanvasView.__init__(self, canvas, parent) matrix = self.matrix = QWMatrix() matrix.scale(2,2) def drawContents(self, painter, cx, cy, cw, ch): painter.setWorldMatrix(self.matrix) QCanvasView.drawContents(self, painter, cx, cy, cw, ch) Unfortunately this doesn't work, in several ways: First, the last four parameters are not always passed, so an exception "Wrong number of arguments" is raised (This usually happens only in the first call of drawContents). However, when I change it to something like def drawContents(*args): ... apply(QCanvasView.drawContents, args) another exception, "parameter 2 has wrong type", is raised - but not always. The third kind of error is not raising an exception at all, but simply not redrawing the CanvasItems properly after they scrolled out of the viewport an in again. Is this a bug, or am I doing something terribly wrong? Regards Henrik Motakef _______________________________________________________________________ 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de From doug101 at xecu.net Fri Aug 24 01:42:42 2001 From: doug101 at xecu.net (Doug Bell) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Problems with QWMatrix and QCanvasView In-Reply-To: <200108231144.f7NBiBp17657@mailgate3.cinetic.de>; from henrik.motakef@web.de on Thu, Aug 23, 2001 at 01:44:11PM +0200 References: <200108231144.f7NBiBp17657@mailgate3.cinetic.de> Message-ID: <20010823194409.A1322@dougbell.xecu.net> Henrik Motakef wrote: > Hi, > > I want to create a QCanvasView which shows a "zoomed" version of it's Canvas. What I tried looked like this: > > class ZoomedCanvasView(QCanvasView): > def __init__(self, canvas, parent): > QCanvasView.__init__(self, canvas, parent) > matrix = self.matrix = QWMatrix() > matrix.scale(2,2) > > def drawContents(self, painter, cx, cy, cw, ch): > painter.setWorldMatrix(self.matrix) > QCanvasView.drawContents(self, painter, cx, cy, cw, ch) > > Unfortunately this doesn't work, in several ways: First, the last four parameters are not always passed, so an exception "Wrong number of arguments" is raised (This usually happens only in the first call of drawContents). However, when I change it to something like > > def drawContents(*args): > ... > apply(QCanvasView.drawContents, args) > > another exception, "parameter 2 has wrong type", is raised - but not always. The third kind of error is not raising an exception at all, but simply not redrawing the CanvasItems properly after they scrolled out of the viewport an in again. > > Is this a bug, or am I doing something terribly wrong? This looks like the same problem that I've run into with QScrollView. What is happening is that your drawContents overridden function is being called for both QCanvasView.drawContents(self, painter, cx, cy, cw, ch) and for QFrame.drawContents(self, painter). The following has worked for me: def drawContents(self, painter, clipX=None, clipY=None, \ clipW=None, clipH=None): if clipX == None: # none is for wrong overridden function return QFrame.drawContents(self, painter) # rest of your draw code Hope this helps, Doug. From henrik.motakef at web.de Fri Aug 24 10:28:40 2001 From: henrik.motakef at web.de (Henrik Motakef) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Re: Problems with QWMatrix and QCanvasView Message-ID: <200108241034.f7OAY6p29878@mailgate3.cinetic.de> Doug Bell wrote: > What is happening is that your drawContents overridden function is > being called for both QCanvasView.drawContents(self, painter, cx, > cy, cw, ch) and for QFrame.drawContents(self, painter). ... > Hope this helps, It does, obviously that was the problem. Thanks Henrik Motakef _______________________________________________________________________ 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de From skoer at adams.com Fri Aug 24 17:59:12 2001 From: skoer at adams.com (Stephan Koerner) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] FYI, Things we learned, when trying to load SIPed shared libraries. Message-ID: <3B8679C5.8D9A9657@adams.com> Just thought I'd share some of our experiences with the chance it might help someone else. stephan Revised: 2001-08-23 Subject: Things we learned, when trying to load SIPed shared libraries. When faced with an Import Error or core dump upon an import, the following where a few steps we found helpful to track down shared library loading issues. 1) Fire-up Python with the `-v -v' option just to make certain Python is importing the module/library you expect it to be picking up. 2) For diagnostic purposes do an import on the library directly rather than the pure python helper file. Example: "import libqtc rather than import qt" 3) Take a look inside the SIPed generated library, to see what it depends on. There are different commands on the respective operating systems to do this. AIX `dump -H libc.so ` HP-UX `chatr libc.sl ` IRIX `elfdump -L libc.so ` SunOS `ldd libc.so ` NT dumpbin /DEPENDENTS libc.dll the "Dependency Walker" which comes with the Dev Studio tools is also handy. 4) Shared Library paths? On the various operating systems the loaders often take cues from environment variables to find shared libraries. This bares investigation, only after you are certain that Python is finding the SIPed library properly and now you are fighting an issue that the SIPed library is trying to pull in another library. (Python finds the initial SIPed shared library by way of the normal python path search) The following are some of the environment variables the loaders reference. AIX $LIBPATH HP-UX $SHLIB_PATH IRIX $LD_LIBRARY_PATH, $LD_LIBRARYN32_PATH SunOS $LD_LIBRARY_PATH `env | grep LIB` 5) What's really happening when the loader is trying to pull in libc.s[ol] but fails. It seems some operating systems offer a clue as to why a load may have failed, others don't offer as much information as desired. To help diagnose what might be happening try the following. Example is for AIX. - create a dummy main() with nothing in it ( foo.cxx) echo 'int main(int argc, char **argv){return 1;)} > foo.cxx - Link this against the library in question xlC foo.cxx libqtcmodule.so - Run the resulting executable ./a.out - Watch all those unresolved symbols scroll by - This operation might highlight what subordinate libraries might have problems being loaded. Saga: The following are a couple things which happened to us on the way to getting a SIPed-PyQt application running. This application uses PyQt and we generate our own SIPed modules/libraries. So you will see in our application import qt # which then import libqtcmodule.s[ol] import ourCompiledCode # which then import libourCompiledCode.s[ol] . . Scenario 1) We could import the respective modules/libraries individually but not together. If both where imported python would core dump. The respective libraries libqtcmodule.sl and libourCompiledCodec.sl where loading two different libsip.sl libraries. (One library was picking up the libsip.sl from the build environ and the other was picking it up from the release environ) (I hate it, when that happens;-) Combination of using `chatr` and the `dde` debugger helped track this problem down. (Depending on how you link the .sl there might be an internal reference with a full file spec pointing to it's dependent libraries. Hence the `chatr` command comes in handy. ) (Try looking at the HP-UX link option +cdp ) Scenario 2) Under AIX use the -brtl option on the link command otherwise the libraries won't look for .so files to pull in. Thanks to: The person that posted there steps in hpux_install_notes.txt and solaris_install_notes.txt If anyone remembers who this was could you send me there e-mail address Prepared: skoer@adams.com End: -- From skoer at adams.com Fri Aug 24 18:37:34 2001 From: skoer at adams.com (Stephan Koerner) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] 'Could not read directory' QFileDialog.getSaveFileName(), Unix Message-ID: <3B8682C8.599272A3@adams.com> Hello, Am I doing something silly or is there a quick workaround to this issue. Under UNIX (IRIX, HP-UX, SunOS, ) fn = QFileDialog.getSaveFileName("foo.txt", "Text files (*.txt)", self) Pumps an ERROR alert to the screen with the String 'Could not read the directory foo.txt/' Under NT This command does not present the user with the ERROR alert. Regardless, after the ERROR alert the Dialog is in the proper (current) directory and the program supplied default file name 'foo.txt' is there. To replicate this scenario modify line 236 of the 'application.py' example of the PyQt 2.4 distribution and supply a 'startWith' string as the first argument of QFileDialog.getSaveFileName() Any thoughts on how to prevent the ERROR alert from being invoked would be appreciated. thanks, stephan -- From phinely at hawaii.edu Sat Aug 25 01:18:20 2001 From: phinely at hawaii.edu (Peter Hinely) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] 'Could not read directory' QFileDialog.getSaveFileName(), Unix In-Reply-To: <3B8682C8.599272A3@adams.com> Message-ID: On Fri, 24 Aug 2001, Stephan Koerner wrote: > Hello, > > Am I doing something silly or is there a quick workaround to this issue. > > > Under UNIX (IRIX, HP-UX, SunOS, ) > fn = QFileDialog.getSaveFileName("foo.txt", "Text files (*.txt)", self) > > Pumps an ERROR alert to the screen with the String > 'Could not read the directory foo.txt/' > I had that problem with Qt 2.2 I think. But then it went away in 2.3 (I think). It doesn't have anything to do with Python. regards, peter From phil at river-bank.demon.co.uk Sat Aug 25 13:54:23 2001 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] 'Could not read directory' QFileDialog.getSaveFileName(), Unix References: <3B8682C8.599272A3@adams.com> Message-ID: <3B87926B.515E7C04@river-bank.demon.co.uk> Stephan Koerner wrote: > > Hello, > > Am I doing something silly or is there a quick workaround to this issue. > > Under UNIX (IRIX, HP-UX, SunOS, ) > fn = QFileDialog.getSaveFileName("foo.txt", "Text files (*.txt)", self) > > Pumps an ERROR alert to the screen with the String > 'Could not read the directory foo.txt/' > > Under NT > This command does not present the user with the ERROR alert. > > Regardless, after the ERROR alert the Dialog is in the proper (current) > directory > and the program supplied default file name 'foo.txt' is there. > > To replicate this scenario modify line 236 of the 'application.py' example > of the PyQt 2.4 distribution and supply a 'startWith' string as the first > argument of QFileDialog.getSaveFileName() > > Any thoughts on how to prevent the ERROR alert from being invoked would > be appreciated. I can't reproduce this with PyQt 2.5 and Qt 2.3.1. It's almost certainly a Qt issue - what version are you using? Phil From jjl at pobox.com Sat Aug 25 16:57:50 2001 From: jjl at pobox.com (John J. Lee) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] QInputDialog.getText() AttributeError In-Reply-To: Message-ID: On Wed, 22 Aug 2001, John J. Lee wrote: > Anybody else get an AttributeError (something relating to the familiar > sipThis) on using QInputDialog.getText() more than once? I just tried to > make a short bit of code to demonstrate the problem, but it goes away when > I do that, so I suspect it may be a bug in my code. > > I've replaced it with a Python class easily enough, but thought I'd check > to see if it's worth trying to track down the problem. Forgot to say, using Qt 2.4 / sip 2.4. Though apparently nobody else has had this problem. John From webhost_special at altavista.com Sat Aug 25 18:39:19 2001 From: webhost_special at altavista.com (webhost_special@altavista.com) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] notice from your webhost Message-ID: This email is being sent to you on behalf of your current webspace provider. This message is not a spam or junk email, your email address was supplied to WebHosting.com You will not receive any more messages from WebHosting.com this is a one time special offer notice. WebHosting.com is offering a selected number of webhost's member's the following special offer. This offer is not available on our website at www.webhosting.com or anywhere else, this is a special offer and is valid only for a limitied time. Read on to learn more about this amazing offer. For only $6.25 (one time fee) you can get: > 500mb webspace > unlimited pop3 email addresses > cgi-bin > full ftp access > php, ssi, my-sql, asp support > mySQL database > FREE DOMAIN REGISTRATION (.com .net .org) > unlimited bandwidth > miva merchant account > secure server for transactions > accept credit cards > 24hour technical support You did read it right, all this will only cost you $6.25. There are no monthly fees or any other costs. You are probably wondering how WebHosting.com can offer all this for the very low price of only $6.25, the answer is that WebHosting.com will make a lot of revenue from extra webspace charges - people wishing to have more than 500mb can pay $10 per 10mb per month. If you would like to receive this excellent offer all you have to do is send your details to the following email address and your username and password will be emailed to you within 5 business days. Then you will be able to login at the members area of WebHosting.com and configure your account (add domains, setup scripts etc.). Please send all of the following details: Your Full Name Your Full Address Your Phone Number Your Email Address Your Credit Card Number Your Credit Card Expiry Date Your Credit Card Type (eg. visa, mastercard etc.) Send all of the above to webhost@techie.com Thank you and I hope you enjoy this very special offer John Simmons Head of Special Promotions, Webhosting.com ------------------------------------------------------------------------------------- WebHosting.com is a member of the CNS International Internet Businesses Association From doug101 at xecu.net Thu Aug 30 02:31:53 2001 From: doug101 at xecu.net (Doug Bell) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Window captions on MS Windows In-Reply-To: <3B8679C5.8D9A9657@adams.com>; from skoer@adams.com on Fri, Aug 24, 2001 at 11:59:01AM -0400 References: <3B8679C5.8D9A9657@adams.com> Message-ID: <20010829203323.A8806@dougbell.xecu.net> Some of you have certainly noticed the "[Freeware]" that is added to all window captions when using PyQt with the Qt non-commercial edition for Windows. It is troublesome because it is appended before the caption that you assign, so that the real caption is not seen at all on small dialog boxes and taskbar entries. I have discovered that the "[Freeware]" addition does not appear if the string "Qt" appears somewhere in the assigned caption (strange, huh?). So an acknowledgement of Qt can be put later in the caption, leaving a more descriptive title visible when windows and dialogs are small. Please note that I'm not trying to thwart license restrictions - my programs are still clearly labelled as non-commercial. But now users can see a meaningful title on some small dialog boxes. Doug. From chakie at infa.abo.fi Thu Aug 30 17:30:27 2001 From: chakie at infa.abo.fi (Jan Ekholm) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Compilation problems In-Reply-To: <20010829203323.A8806@dougbell.xecu.net> Message-ID: Hi all, I've been using PyQt for a few months now on RedHat boxes without any problems. However I installed Debian Woody on my main machine at home a few days ago and have some problems getting PyQt working again. "sip" works fine, I think. At least version 2.4 was available as a Debian package and installed ok. I tried to compile PyQt-2.5 for the source tar.gz, the one for Qt 2.3.0 but haven't been able to get it through the compiler yet. I configure it like this as Debian still has Python 1.5.2 as "python": % ./configure --with-python=/usr/bin/python2 Works fine. When actually make:ing it I get (slightly edited): % make .... make[2]: Entering directory `/usr/src/PyQt-2.5/qt' /bin/sh ../libtool --mode=compile g++ -O -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.0 -I/usr/include/sip -I/usr/include/qt -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp g++ -O -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.0 -I/usr/include/sip -I/usr/include/qt -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fPIC -DPIC -o qtcmodule.lo qtcmodule.cpp: In method `void sipProxyqt::proxySlot(QAction *)': qtcmodule.cpp:4283: `sipSender' undeclared (first use this function) qtcmodule.cpp:4283: (Each undeclared identifier is reported only once qtcmodule.cpp:4283: for each function it appears in.) qtcmodule.cpp: At top level: qtcmodule.cpp:6095: excess elements in aggregate initializer qtcmodule.cpp:6095: excess elements in aggregate initializer ... There are maybe a hundred of the "excess elements" errors after those two lines and then the compilation fails. c++ is version 2.95.4. I know I've compiled PyQt-2.4 earlier on a Woody without any major problems. Should I use 2.4 instead? I'd appreciate any hints or help. Regards, Jan Ekholm ----------------------------------------------------------------------------- Real children don't go hoppity-skip unless they are on drugs. -- Susan Sto Helit, in Hogfather (Terry Pratchett) From gvermeul at labs.polycnrs-gre.fr Thu Aug 30 17:52:48 2001 From: gvermeul at labs.polycnrs-gre.fr (Gerard Vermeulen) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Compilation problems In-Reply-To: References: Message-ID: <01083017525100.22245@taco.polycnrs-gre.fr> Hi Jan, I do not know if this is the origin of ALL you problems, but if you want to install PyQt-2.5, I would advise you to install sip-2.5 first (even without regenerating the C++-code, because the libraries and header files of sip-2.4 may be incompatible with PyQt-2.5). Gerard On Thursday 30 August 2001 17:30, Jan Ekholm wrote: > Hi all, > > I've been using PyQt for a few months now on RedHat boxes without any > problems. However I installed Debian Woody on my main machine at home a > few days ago and have some problems getting PyQt working again. "sip" > works fine, I think. At least version 2.4 was available as a Debian > package and installed ok. > > I tried to compile PyQt-2.5 for the source tar.gz, the one for Qt 2.3.0 > but haven't been able to get it through the compiler yet. I configure it > like this as Debian still has Python 1.5.2 as "python": > > % ./configure --with-python=/usr/bin/python2 > > Works fine. When actually make:ing it I get (slightly edited): > > % make > .... > make[2]: Entering directory `/usr/src/PyQt-2.5/qt' > > /bin/sh ../libtool --mode=compile g++ -O -DHAVE_CONFIG_H -I. -I. -I.. > -I/usr/include/python2.0 -I/usr/include/sip -I/usr/include/qt > -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp > > g++ -O -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.0 > -I/usr/include/sip -I/usr/include/qt -I/usr/X11R6/include > -fno-exceptions -O2 -c qtcmodule.cpp -fPIC -DPIC -o qtcmodule.lo > > qtcmodule.cpp: In method `void sipProxyqt::proxySlot(QAction *)': > qtcmodule.cpp:4283: `sipSender' undeclared (first use this function) > qtcmodule.cpp:4283: (Each undeclared identifier is reported only once > qtcmodule.cpp:4283: for each function it appears in.) > qtcmodule.cpp: At top level: > qtcmodule.cpp:6095: excess elements in aggregate initializer > qtcmodule.cpp:6095: excess elements in aggregate initializer > ... > > There are maybe a hundred of the "excess elements" errors after those two > lines and then the compilation fails. > > c++ is version 2.95.4. I know I've compiled PyQt-2.4 earlier on a Woody > without any major problems. Should I use 2.4 instead? I'd appreciate any > hints or help. > > Regards, > Jan Ekholm > > --------------------------------------------------------------------------- >-- Real children don't go hoppity-skip unless they are on drugs. -- Susan > Sto Helit, in Hogfather (Terry Pratchett) > > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde From chakie at infa.abo.fi Thu Aug 30 18:59:50 2001 From: chakie at infa.abo.fi (Jan Ekholm) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Compilation problems In-Reply-To: <01083017525100.22245@taco.polycnrs-gre.fr> Message-ID: On Thu, 30 Aug 2001, Gerard Vermeulen wrote: >Hi Jan, > >I do not know if this is the origin of ALL you problems, >but if you want to install PyQt-2.5, I would advise you to install >sip-2.5 first (even without regenerating the C++-code, because >the libraries and header files of sip-2.4 may be incompatible >with PyQt-2.5). Hi Gerard, I installed sip-2.5 instead, and it seems to indeed solve the problem. At least the problem file now compiles. PyQt takes a while to compile on my oldish machine, but it looks good. Thanks for the help, I was really at loss there! ----------------------------------------------------------------------------- Real children don't go hoppity-skip unless they are on drugs. -- Susan Sto Helit, in Hogfather (Terry Pratchett) From boud at rempt.xs4all.nl Thu Aug 30 21:02:03 2001 From: boud at rempt.xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? In-Reply-To: <3B68832E.7025FB24@river-bank.demon.co.uk> References: <20010731224914.88477.qmail@web11403.mail.yahoo.com> <3B68832E.7025FB24@river-bank.demon.co.uk> Message-ID: <200108301900.f7UJ0di02680@calcifer.valdyas.org> On Thursday 02 August 2001 00:31, you wrote: > Bryan Brunton wrote: > > (Reposting due to no response from previous post) > > > > Does anyone have the QObject.tr() method working? > > > > You can use the .qm file from the QT 2.3.1 i8ln example to test the code > > down below. The QApplication.translate method will correctly translate. > > The tr method of the MyWidget object will not. > > Which version of PyQt? It's broken in 2.4 but should be fixed in the 2.5 > pre-releases. (But note that the 2.5 releases will only compile against > Qt 2.3.1 - but that has been fixed in the CVS.) > > Phil > Would it be possible to have pyuic generate tr() strings with double quotes around them? That would meant that the standard lupdate tool in Qt3/Qt Linguist would stand a fair chance of actually finding the strings - the single-quoted string pyuic produces are ignored... From boud at rempt.xs4all.nl Thu Aug 30 21:23:17 2001 From: boud at rempt.xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? In-Reply-To: <200108301900.f7UJ0di02680@calcifer.valdyas.org> References: <20010731224914.88477.qmail@web11403.mail.yahoo.com> <3B68832E.7025FB24@river-bank.demon.co.uk> <200108301900.f7UJ0di02680@calcifer.valdyas.org> Message-ID: <200108301921.f7UJLtN03005@calcifer.valdyas.org> On Thursday 30 August 2001 21:00, Boudewijn Rempt wrote: > On Thursday 02 August 2001 00:31, you wrote: > > Bryan Brunton wrote: > > > (Reposting due to no response from previous post) > > > > > > Does anyone have the QObject.tr() method working? > > > > > > You can use the .qm file from the QT 2.3.1 i8ln example to test the > > > code down below. The QApplication.translate method will correctly > > > translate. The tr method of the MyWidget object will not. > > > > Which version of PyQt? It's broken in 2.4 but should be fixed in the 2.5 > > pre-releases. (But note that the 2.5 releases will only compile against > > Qt 2.3.1 - but that has been fixed in the CVS.) > > > > Phil > > Would it be possible to have pyuic generate tr() strings with double quotes > around them? That would meant that the standard lupdate tool in Qt3/Qt > Linguist would stand a fair chance of actually finding the strings - the > single-quoted string pyuic produces are ignored... > Er, yes, it is possible: at least, this version of the fixString function works: // fixString is only used in conjunction with tr(). We need to write out the // string in utf8 and make sure it's converted from utf8 when created. static QString fixString( const QString &str ) { QString s( str ); s.replace( QRegExp( "\\\\" ), "\\\\" ); s.replace( QRegExp( "\"" ), "\\\"" ); s.replace( QRegExp( "\n" ), "\\n" ); s.replace( QRegExp( "\r" ), "\\r" ); s.replace( QRegExp( "\"" ), "\\\"" ); bool onlyAscii = TRUE; unsigned int i; for ( i = 0; i < s.length(); i++ ) { if ( s.at(i).unicode() >= 0x80 ) { onlyAscii = FALSE; break; } } if ( onlyAscii ) s = "\"" + s + "\""; else s = "QString.fromUtf8(\"" + s + "\")"; return s; } From boud at rempt.xs4all.nl Thu Aug 30 22:22:24 2001 From: boud at rempt.xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? In-Reply-To: <3B68832E.7025FB24@river-bank.demon.co.uk> References: <20010731224914.88477.qmail@web11403.mail.yahoo.com> <3B68832E.7025FB24@river-bank.demon.co.uk> Message-ID: <200108302016.f7UKG5E03509@calcifer.valdyas.org> On Thursday 02 August 2001 00:31, Phil Thompson wrote: > Bryan Brunton wrote: > > (Reposting due to no response from previous post) > > > > Does anyone have the QObject.tr() method working? > > > > You can use the .qm file from the QT 2.3.1 i8ln example to test the code > > down below. The QApplication.translate method will correctly translate. > > The tr method of the MyWidget object will not. > > Which version of PyQt? It's broken in 2.4 but should be fixed in the 2.5 > pre-releases. (But note that the 2.5 releases will only compile against > Qt 2.3.1 - but that has been fixed in the CVS.) > > Phil > > I'm now also working on this topic, and I found that even with PyQt 2.5, the tr function doesn't work - a bit of a wrench, since that's the last bit I need to finish the last-but-one chapter of Part III! From phil at river-bank.demon.co.uk Fri Aug 31 12:12:37 2001 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? References: <20010731224914.88477.qmail@web11403.mail.yahoo.com> <3B68832E.7025FB24@river-bank.demon.co.uk> <200108302016.f7UKG5E03509@calcifer.valdyas.org> Message-ID: <3B8F6395.4523CCB3@river-bank.demon.co.uk> Boudewijn Rempt wrote: > > On Thursday 02 August 2001 00:31, Phil Thompson wrote: > > Bryan Brunton wrote: > > > (Reposting due to no response from previous post) > > > > > > Does anyone have the QObject.tr() method working? > > > > > > You can use the .qm file from the QT 2.3.1 i8ln example to test the code > > > down below. The QApplication.translate method will correctly translate. > > > The tr method of the MyWidget object will not. > > > > Which version of PyQt? It's broken in 2.4 but should be fixed in the 2.5 > > pre-releases. (But note that the 2.5 releases will only compile against > > Qt 2.3.1 - but that has been fixed in the CVS.) > > > > Phil > > > > > > I'm now also working on this topic, and I found that even with PyQt 2.5, > the tr function doesn't work - a bit of a wrench, since that's the last bit > I need to finish the last-but-one chapter of Part III! Hmm, I tested 2.5 with the test case that Bryan provided and it seemed to work Ok. Do you have a test case that demonstrates the problem? Phil From boud at rempt.xs4all.nl Fri Aug 31 12:55:56 2001 From: boud at rempt.xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:25 2007 Subject: [PyKDE] Phil: Any chance of getting the TR (translate) method working? In-Reply-To: <3B8F6395.4523CCB3@river-bank.demon.co.uk> Message-ID: On Fri, 31 Aug 2001, Phil Thompson wrote: > Boudewijn Rempt wrote: > > > > On Thursday 02 August 2001 00:31, Phil Thompson wrote: > > > Bryan Brunton wrote: > > > > (Reposting due to no response from previous post) > > > > > > > > Does anyone have the QObject.tr() method working? > > > > > > > > You can use the .qm file from the QT 2.3.1 i8ln example to test the code > > > > down below. The QApplication.translate method will correctly translate. > > > > The tr method of the MyWidget object will not. > > > > > > Which version of PyQt? It's broken in 2.4 but should be fixed in the 2.5 > > > pre-releases. (But note that the 2.5 releases will only compile against > > > Qt 2.3.1 - but that has been fixed in the CVS.) > > > > > > Phil > > > > > > > > > > I'm now also working on this topic, and I found that even with PyQt 2.5, > > the tr function doesn't work - a bit of a wrench, since that's the last bit > > I need to finish the last-but-one chapter of Part III! > > Hmm, I tested 2.5 with the test case that Bryan provided and it seemed > to work Ok. Do you have a test case that demonstrates the problem? > I used exactly the same testcase - but did you remove the app.translate line? That one was meant just to show that the translate() function worked, but the tr not: import sys from qt import * class MyWidget(QMainWindow): def __init__(self): QMainWindow.__init__(self,None,'',Qt.WDestructiveClose) self.setCaption( self.tr("Internationalization Example" ) ); if __name__ == '__main__': a = QApplication(sys.argv) QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()')) translator = QTranslator(None) translator.load( "mywidget_fr.qm", "." ) a.installTranslator( translator ) print(translator.contains("MyWidget", "Internationalization Example")) print(QTextCodec.locale()) w = MyWidget() # comment this one out to actually test the problem #w.setCaption(a.translate("MyWidget", "Internationalization Example")) a.setMainWidget(w) w.show() a.exec_loop() Boudewijn Rempt | http://www.valdyas.org