[PyKDE] Help getting started with applets
Hi, I've just got PyQt and PyKDE built and it all looks good. I want to write a panel applet but I don't know how to get started. I know how in C from the tutorial : http://developer.kde.org/documentation/tutorials/dot/panel-applets.html but I can't think how to do this with PyKDE and I can't find any docs/tutorials/examples for applets. Could anyone give me some pointers? Perhaps port the first hello world example from the link to pyKDE? That would be great. Thanks Chris ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] PyQt on Win2000
I'm interested in trying PyQt out. I've installed the Non-Commercial version of Qt as well as the associated PyQt module. All the installs seemed to go fine. However my initial attempt to import qt results in... from qt import * Traceback (most recent call last): File pyshell#1, line 1, in ? from qt import * File D:\Program Files\Python22\lib\qt.py, line 46, in ? import libsip ImportError: DLL load failed: The specified module could not be found. From what I read PyQt included the SIP module but all I can find on my system is libsip.dll under the Python 2.2 libs directory. Any direction on how I might further troubleshoot/correct the problem would be appreciated. Please reply directly as I'm not yet a member of the mailing list. Thanks! Lance ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] PyQt on Win2000
Am Don, 2002-04-11 um 02.09 schrieb Roundy, Lance: I'm interested in trying PyQt out. I've installed the Non-Commercial version of Qt as well as the associated PyQt module. All the installs seemed to go fine. However my initial attempt to import qt results in... from qt import * Traceback (most recent call last): File pyshell#1, line 1, in ? from qt import * File D:\Program Files\Python22\lib\qt.py, line 46, in ? import libsip ImportError: DLL load failed: The specified module could not be found. From what I read PyQt included the SIP module but all I can find on my system is libsip.dll under the Python 2.2 libs directory. copy libsip.dll to windows/system32 -- :M: -- || | Dipl.-Inf. Michael 'Mickey' Lauer [EMAIL PROTECTED] | | Raum 10b - ++49 69 798 28358Fachbereich Informatik und Biologie | || ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] PyQt 3.1, Win2000, and MSVC runtime library
Hi, I want to pass on a fix I made to the Windows build of PyQt/Sip 3.1 using MS VC++. My build configuration is as follows: NT 4.0 SP 5 VC++ 6.0 SP 5 PyQt/Sip 3.1 Qt 3.0.3 Python 2.2.0 After building PyQt, I was able to run the PyQt examples on my NT 4.0 box, but when I ran the examples on a Win2000 box, they crashed at various times (most often when exiting the app). Here is the Win2000 configuration I tested: Windows 2000 Professional 5.0.2195 SP 2 While investigating, I noticed that the build was mixing static (MT) and DLL (MD) versions of the C runtime library: Package C runtime option --- Python -MD Qt -MD PyQt/Sip -MT This is a no-no according to our friends at Microsoft: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_.2f.md.2c_2f.ml.2c_2f.mt.2c_2f.ld.asp I went back to the PyQt/Sip build and changed the Makefile.win32-msvc files, replacing -MT with -MD. Now the examples run fine for me on both NT 4.0 and Win2000. This is a head scratcher, because I know some of you are running on Win2000 without problems -- maybe you made this fix too. Paul begin:vcard n:Felix;Paul tel;work:603-643-2600 x-mozilla-html:FALSE url:www.fluent.com org:Fluent Inc. adr:;;10 Cavendish Ct.;Lebanon;NH;03766;USA version:2.1 email;internet:[EMAIL PROTECTED] title:Software Development fn:Paul Felix end:vcard
[PyKDE] Re: Help getting started with applets
On 11-Apr-02 Chris Burn [EMAIL PROTECTED] wrote: Hi, I've just got PyQt and PyKDE built and it all looks good. I want to write a panel applet but I don't know how to get started. I know how in C from the tutorial : http://developer.kde.org/documentation/tutorials/dot/panel-applets .html but I can't think how to do this with PyKDE and I can't find any docs/tutorials/examples for applets. Could anyone give me some pointers? Perhaps port the first hello world example from the link to pyKDE? That would be great. Basically everything you need is already in PyKDE2, but there are two nasty problems to overcome: 1. You need to embed the Python interpreter into your application for this to run (something has to run the Python code) 2. You need to create a .so library so KDE can load your applet. Without going into a lot of detail at the moment, the way I'd approach this (since I've already done something similar and know it works) is: a. Build a .so lib that embeds the Python interpreter (which is a static lib) - I have this done but the build process is very specific to my setup at the moment, so I can't distribute it easily. b. Create a .so library following the tutorial steps for loading your applet, but expand the 'init' function to load the Python interpreter .so as a plugin. I haven't looked at this very closely, but if the QString (configFile) that's passed in will support it, it should be possible to create a mechanism which will allow loading any Python applet via a single general .so lib, which I can put together and distribute with PyKDE2. There are pretty much two options: you can pursue this yourself, in which case contact me directly and I'll try and provide some code to get you started, or I'll get to this but it will take some time. I'm just getting ready to start doing my tax return, so the next 4 days are shot, and I've also started on the PyKDE2 release for KDE3.0 final. I can try and put something together in 2 or 3 weeks, since I have most of the pieces already. Getting the automake/autoconfig stuff setup is the hardest part. Another possible approach is to write the applet .so as in the the tutorial, and have it exec Python with command line args that load your app, but I haven't tried this. Jim ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: Help getting started with applets
On 11-Apr-02 ian reinhart geiser wrote: We are actually talking about this in KDE. The current plan is to make a wrapper KPart and Kicker applet that will load PyKDE applets... That's pretty much what I was getting at. I am not sure what the progress on this is. I can crank out a kicker applet in about 5 min, the hard part would be loading the pyqt code. is anyone here an embedding expert that would want to attack at least kicker applets with me first? Loading PyQt or PyKDE2 code just requires a Python 'import' statement in the script you want to run. You'd want to load Python scripts - not PyQt or PyKDE2 code especially. It's not necessary for the KPart/applet to know anything about PyQt or PyKDE2. You could probably write applets with Tk, PyGTK or wxWindows too - I assume applets have their own event loop, which is the only major consideration I can think of. if we can do a kicker applet any kpart would be trivial. I already have a working KPart, so the kicker applet won't be a lot of work. I just need to find the time to write it up. As far as I can see, KDE already has all the necessary machinery to implement this except the Python specific stuff. There are some potential problems (concurrency), but probably nothing major. Jim ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] Source for GUI Programming with Python Using the Qt Toolkit
I've cleaned up the source code for all the examples in the book, and ported it to PyQt 3.1. While awaiting the Opendocs webforum for the book, I've put up the packages on my own webserver. http://www.xs4all.nl/~bsarempt/python/pyqt_qt2.tgz Source for Python 1.x, 2.x, Qt 2.x, 3.x and PyQt 2.x. (Grab this if you use the PyQt that comes with your Linux distribution.) http://www.xs4all.nl/~bsarempt/python/pyqt_qt2.tgz Source for Python 2.x, Qt 3.x and PyQt 3.x. (Grab this if you're current with the PyQt from http://www.riverbankcomputing.co.uk The book can be read online at: http://www.opendocspublishing.com/pyqt Or bought, for instance from Amazon: http://www.amazon.com/exec/obidos/ASIN/0970033044/qid=1016980570/sr=8-1/ref=sr_8_1_1/102-2842252-0596931 -- Boudewijn Rempt | http://www.valdyas.org ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] Building My Own Bindings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greetings I have been working on wraping some of my own qt derived widgets with sip and I have run into a wall on windows. I have generated bindings that work perfectly on linux, but for some reason when I try to run it on windows it crashes horribly with no other error than : Unhandled exception in python.exe (QT-MT302.DLL) 0xC005 Access Violation. Unfortunatly windows has no concept of debugging so I cannot even get something like a backtrace. The example PyQT applications work, and my non qt classes i created bindings with work perfectly. Could anyone offer any insight on this? Is PyQt even ment to be extended, or am i going about this the wrong way? I checked out the created dll and the imports looked good, I also compiled it with SIP_USE_DLL and linked in libqtc.lib. As an added bonus I also checked for undefined symbols and found none... TIA - -ian reinhart geiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8tlKlPy62TRm8dvgRAqO5AKDrmqcK5NbxRlL7t0Evtw0wrdonEACfcgCT 80bTlP08IvEDpbur1sd1Mtw= =kbr2 -END PGP SIGNATURE- _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde