Re: [PyKDE] PyQt and sip: WId is undefined
On Fri, 10 Jun 2005, Phil Thompson wrote: On Friday 10 June 2005 10:21 pm, Jeremy C. Reed wrote: I am trying to build PyQt-x11-gpl-3.14.1 on Darwin 7.9.0/Mac OS X. You need PyQt-mac-gpl-3.14.1. X11 on Mac is not supported. Okay, I will give this a try. What are the plans for X11 on Mac? It will remain unsupported. Will the PyQt-mac version work with qt-x11-free? I don't know. We are using X11 version of Qt and hope to use X11 for PyQt also. I don't know PyQt myself (as I am helping with packaging), but we hope to have a consistent environment from Darwin, Mac OS X, Solaris, and NetBSD (which all have X). But maybe the PyQt-mac for Mac OS X will behave the same. Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Re: Memory leak segfault with deleteLater
Phil Thompson [EMAIL PROTECTED] wrote: I'm not sure if anything can be done to detect and/or prevent the problem. It would be easy enough to contrive the same problem in C++, so I don't really see it as a PyQt problem. I'm open to suggestions. What about adding adding a flag (static variable in the derived destructor) which records if we are already destroying the object? So that, if the derived destructor gets re-invoked as part of a reference cycle, it just silently exits without doing anything. I think you have a similar variable, which records if the C++-side of the object is destroyed or not... maybe you could set that at the very start of the derived destructor. But that would be too late wouldn't it? You are still going to get a double free of the object. I think one way around the problem is to avoid the extra reference to the Python object and move the data that it contains into a separate data structure. In other words, weaken the link between the Python world and the C++ world. My concern would then be stopping the new data structure leaking - I need to think about it a bit more. Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] PyQt and sip: WId is undefined
I don't know PyQt myself (as I am helping with packaging), but we hope to have a consistent environment from Darwin, Mac OS X, Solaris, and NetBSD (which all have X). But maybe the PyQt-mac for Mac OS X will behave the same. What are your worries? I use PyQt on mac - and it doesn't require me to run X11, which I as a user think is very good. And there is no os-specific stuff in my apps to do (at least not regarding qt itself). The whole purpose of Qt is to behave the same - regardless of the platform. That's why it's called platform independed.. :) Diez ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Docstrings with SIP
Is there a way to provide docstrings for module, classes and their methods without hacking generated structures? -- Denis S. Otkidach http://www.python.ru/ [ru] ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] Docstrings with SIP
Is there a way to provide docstrings for module, classes and their methods without hacking generated structures? No. It's been on the TODO list for a while. Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Q's about eric3...
hi! Some questions: 1) How can I change current tab in editor trhough keyboard, not mouse? 2) Are you planning to make context-sensitive help for Python, PyQt? 3) Are you planning to make context-sensitive autocompletion? For example: I type class name, press dot and receive all methods of that class in drop-down list. thanks -- WBR Guest007 JID: [EMAIL PROTECTED] ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] KSystemTray issues
Hello everyone. I have a little problem with a python script of mine, using the KSystemTray widget. This is the code below (dirty I know), and here's a link to a screenshot: http://members.lycos.co.uk/sweiss3/extra/menu.png The problem is the unknown caption which appears on top of the system tray icon's menu. Can you please tell me what I'm doing wrong? Here's the code: from qt import * from kdecore import * from kdeui import * from updateform import * import sys if __name__ == __main__: def processUpdateFile(fileString, ListView): updateFile = open(fileString, 'r') packageList = updateFile.readlines() updateFile.close() for i in range(len(packageList)): packageString=packageList[i].split(' ') package = QListViewItem(ListView, packageString[0], packageString[1], packageString[2]) app = KApplication(sys.argv, Updater) form = UpdateForm() trayicon = KSystemTray(form, System Updater) trayicon.setPixmap( QPixmap(konsole.png) ) trayicon.setCaption(New updates are available) trayicon.contextMenu().insertTitle(System Update) # b=KPopupMenu() # b.insertTitle(Testing) # trayicon.contextMenuAboutToShow(b) trayicon.show() form.show() processUpdateFile('/home/sweiss/testpac.txt',form.packageListView) app.setMainWidget(form) app.exec_loop() trayicon.hide() Thanks in advance, Shahar. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] SIP parse error
On Sun, 19 Jun 2005 14:37:48 +0100 Phil Thompson [EMAIL PROTECTED] wrote: On Friday 17 June 2005 9:13 pm, James Emerton wrote: There is a small issue with the parsing code in SIP. I get a parse error whenever a %MethodCode section contains a %, such as a printf() format string. My workaround right now is to use something like this... const char fmt[] = { 37, '0', '4', 'd', 37, '0', '2', 'd', 37, '0', '2', 'd', 0 }; Should be fixed in tonight's snapshot. I see some strange syntax errors with this snapshot for project successfully built with sip-snapshot-20050605. In all cases the error is in %Included file and in one case the error is at line 271 of file having 214 lines. -- Denis S. Otkidach http://www.python.ru/ [ru] ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] PyQt and sip: WId is undefined
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If the application you are packaging sticks to the Qt API and does not use X11-specific stuff (i.e. it's not a KDE app), there should be no difference in functionality under Aqua and X. It will look different, because Qt conforms to the interface conventions of each platform it runs on, but it also abstracts those differences away from the developer (unlike wxWidgets, which requires some Mac-specific hacks to get the about menu in the right place). Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:[EMAIL PROTECTED] Jeremy C. Reed wrote: | On Fri, 10 Jun 2005, Phil Thompson wrote: | | |On Friday 10 June 2005 10:21 pm, Jeremy C. Reed wrote: | |I am trying to build PyQt-x11-gpl-3.14.1 on Darwin 7.9.0/Mac OS X. | |You need PyQt-mac-gpl-3.14.1. X11 on Mac is not supported. | | | Okay, I will give this a try. | | What are the plans for X11 on Mac? | | Will the PyQt-mac version work with qt-x11-free? | | We are using X11 version of Qt and hope to use X11 for PyQt also. | | I don't know PyQt myself (as I am helping with packaging), but we hope to | have a consistent environment from Darwin, Mac OS X, Solaris, and NetBSD | (which all have X). But maybe the PyQt-mac for Mac OS X will behave the | same. | | Jeremy C. Reed | |Low cost press releases |http://www.reedmedia.net/ | | ___ | PyKDE mailing listPyKDE@mats.imk.fraunhofer.de | http://mats.imk.fraunhofer.de/mailman/listinfo/pykde | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuCfnJmdQs+6YVcoRAlwjAKCE6kpzmuO6arAOXHznU5Va6WG+5gCfdk1Q Sjd+/RlpLTrgUUiH1YTAs6U= =j6qc -END PGP SIGNATURE- ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] SIP parse error
On Sun, 19 Jun 2005 14:37:48 +0100 Phil Thompson [EMAIL PROTECTED] wrote: On Friday 17 June 2005 9:13 pm, James Emerton wrote: There is a small issue with the parsing code in SIP. I get a parse error whenever a %MethodCode section contains a %, such as a printf() format string. My workaround right now is to use something like this... const char fmt[] = { 37, '0', '4', 'd', 37, '0', '2', 'd', 37, '0', '2', 'd', 0 }; Should be fixed in tonight's snapshot. I see some strange syntax errors with this snapshot for project successfully built with sip-snapshot-20050605. In all cases the error is in %Included file and in one case the error is at line 271 of file having 214 lines. Can you send me a test case? Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] SIP parse error
On Tue, 21 Jun 2005 15:52:15 +0100 (BST) Phil Thompson [EMAIL PROTECTED] wrote: I see some strange syntax errors with this snapshot for project successfully built with sip-snapshot-20050605. In all cases the error is in %Included file and in one case the error is at line 271 of file having 214 lines. Can you send me a test case? Looks like I've found one minimal example: == sip_bug.sip == %Module sip_bug %PostInitialisationCode (void)0; %End %Include MyClass.sip == MyClass.sip == %ModuleHeaderCode class MyClass { public: void method() {}; }; // If you remove next line the error gone %End class MyClass { public: void method(); %MethodCode (void)0; %End }; == $ ./configure_sip_bug.py sip -e -w -c . -b sip_bug.sbf sip_bug.sip sip: MyClass.sip:20: syntax error As you can see MyClass.sip consist of 16 lines only. -- Denis S. Otkidach http://www.python.ru/ [ru] ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] KSystemTray issues
Thank you, this way I was able to set the application's name, thanks a lot. Still I wasn't able to find a way of replacing the icon beside it. I looked at KDE's reference regarding KAboutData which had a setProgramLogo() method. This method however wasn't present in the python object. Can you please help me with that? Thanks again, Shahar. On Tuesday 21 June 2005 15:04, you wrote: Your application doesn't seems to have a name. I had the same problem when using KStdAction to generate the help menu. To give a name to your application, you must use KAboutData This is a modified example of an application I'm developping : from xxx import version def getAboutData(): # Adding informations about the program aboutData = KAboutData(version.__program__, version.__program__, version.__version__, version.__description__, KAboutData.License_GPL_V2, version.__copyright__) for author in version.__authors__: aboutData.addAuthor(author[name], , author[email]) aboutData.setBugAddress(version.__bugs__) return aboutData if __name__ == __main__: # Adding some parameters to the application sys.argv.extend(['--icon', 'source_py', '--caption', version.__description__ + ' v' + version.__version__]) aboutData = getAboutData() # Initialisation with KCmdLineArgs to use KAboutData KCmdLineArgs.init(sys.argv, aboutData) # Adding command line options KCmdLineArgs.addCmdLineOptions([(+file, xxx file to open, )]) # KApplication with empty arguments, as the application # instance is already created kapp = KApplication() Shahar Weiss wrote: Hello everyone. I have a little problem with a python script of mine, using the KSystemTray widget. This is the code below (dirty I know), and here's a link to a screenshot: http://members.lycos.co.uk/sweiss3/extra/menu.png The problem is the unknown caption which appears on top of the system tray icon's menu. Can you please tell me what I'm doing wrong? Here's the code: from qt import * from kdecore import * from kdeui import * from updateform import * import sys if __name__ == __main__: def processUpdateFile(fileString, ListView): updateFile = open(fileString, 'r') packageList = updateFile.readlines() updateFile.close() for i in range(len(packageList)): packageString=packageList[i].split(' ') package = QListViewItem(ListView, packageString[0], packageString[1], packageString[2]) app = KApplication(sys.argv, Updater) form = UpdateForm() trayicon = KSystemTray(form, System Updater) trayicon.setPixmap( QPixmap(konsole.png) ) trayicon.setCaption(New updates are available) trayicon.contextMenu().insertTitle(System Update) #b=KPopupMenu() #b.insertTitle(Testing) #trayicon.contextMenuAboutToShow(b) trayicon.show() form.show() processUpdateFile('/home/sweiss/testpac.txt',form.packageListView) app.setMainWidget(form) app.exec_loop() trayicon.hide() Thanks in advance, Shahar. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Re: [Pyqt-mac-list] new eric just as crashy?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, so much for that theory. I was able to get PyQt-Mac built against Python 2.4.1, but Eric crashes just as often there. Segfaults when trying to run a script and also when it's trying to extract a method. I didn't test further, but it's pretty clear that it's fragile on the Mac. Well, one can do PyQt development without Eric3 (just as one can do wxPython development without Spe wxGlade). Emacs + Terminal + Qt Designer works for me. But Eric3 has a lot of nice features, especially searching within files, that I like. I wish I were able to do more to troubleshoot/diagnose the problem. If anyone has any suggestions/ideas/patches, I will be happy to test them. Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:[EMAIL PROTECTED] Diez B. Roggisch wrote: | Am Tuesday, 21. June 2005 05:03 schrieb Kevin Walzer: | |I am wondering if the problem with Eric is not the package itself but |the fact that it's built against the Apple system Python (2.3.5)? I |noticed a big improvement in stability in my wxPython packages when I |moved to Python 2.4.1. However, for various reasons, I've not been able |to get a clean build of PyQt against Python 2.4.1. I | | | You didn't? I had no troubles at all - using OSX 10.3.9 and python 2.4.1. I | had a previous install of a package for python 2.3 on my machine, that | contained the qt binaries - but that was it. | | Now I didn't try and made eric run with it - how to do so? | | Diez | | | --- | SF.Net email is sponsored by: Discover Easy Linux Migration Strategies | from IBM. Find simple to follow Roadmaps, straightforward articles, | informative Webcasts and more! Get everything you need to get up to | speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click | ___ | Pyqt-mac-list mailing list | [EMAIL PROTECTED] | https://lists.sourceforge.net/lists/listinfo/pyqt-mac-list | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuEhjJmdQs+6YVcoRAi9nAJ478iT1BkkHY3ks0pFdBwpfZrT7MwCeLKe0 Y1nY/YXo2ta1eGCXz++IZW0= =GfSj -END PGP SIGNATURE- ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] KSystemTray issues
I don't know the standard way to set the icon, but I use a temporary fix. I add some arguments to sys.argv before the call to KCmdLineArgs.init : # Adding some parameters to the application sys.argv.extend(['--icon', 'source_py', '--caption', version.__description__ + ' v' + version.__version__]) We don't have an official icon for the application, so I use another icon until we create the real thing. Shahar Weiss wrote: Thank you, this way I was able to set the application's name, thanks a lot. Still I wasn't able to find a way of replacing the icon beside it. I looked at KDE's reference regarding KAboutData which had a setProgramLogo() method. This method however wasn't present in the python object. Can you please help me with that? Thanks again, Shahar. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] Q's about eric3...
Am Dienstag, 21. Juni 2005 14:41 schrieb Guest007: hi! Some questions: 1) How can I change current tab in editor trhough keyboard, not mouse? Ctrl+Alt+Tab next tab Ctrl+Alt+Shift+Tab prev tab This is configurable in the keyboard setup dialog. 2) Are you planning to make context-sensitive help for Python, PyQt? 3) Are you planning to make context-sensitive autocompletion? For example: I type class name, press dot and receive all methods of that class in drop-down list. Eric3 uses the QScintilla widget and its features. This isn't among them. If you would like to see them, you have to ask Phil to implement it. But I doubt he will. thanks Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Problems with Eric 3.7
El Lunes, 20 de Junio de 2005 19:56, Detlev Offenbach escrigué: This usually means, that there is an older library somewhere on your disk or the PyQt library it picks up was not compiled with QScintilla support. You can test it yourself by opening a Python shell and entering import qtext. I have build again everything and now it installs without probles. I have make what you sugessted and the version was 1.1 instead of the snapshoot I build adn installed and I don't really understand why :( Well, now is installed! I have run eric3 with $ e3nokde=1 eric3 but the problem I have with the dialogs persists. For example on trying to use the SaveAs function I got: ViewManager.py line 2013 error in handleOpen self.fileFilterString,self.ui, None, None, filter) RuntimeError: cannot pas None as argument 4 in this call I have compiled the latest smapshoots or qt, and qscintilla. I'm working with gcc 4 and qt-3.3 Any ideas? Best regards, -- Antoni Aloy López Binissalem - Mallorca Soci de Bulma # 34 ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde