[Pythonmac-SIG] More on init
An update on my fiddling: snippet from Foundation import * from AppKit import * from PyObjCTools import NibClassBuilder class PySayTextAppDelegate(NibClassBuilder.AutoBaseClass): #IB defined outlets #textField #speechSynthetizer # #IB defined actions #sayIt_ #stopIt_ def init(self): NSLog(init) self.speechSynth = NSSpeechSynthetizer.alloc() self.speechSynth.initWithVoice_(None) return self /snippet In this version the init method gets called. I did remove the attempt to call the super class' init method. I know that the method IS called as I get an exception on NSSpeechSynthetizer.alloc() (hooray... ;-) : NSSpeechSynthetizer is not defined, apparently. An attempt to import Cococa failed miserably... Any idea? Thanks again, Aldo ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] More on init
This works for me: snippet from Foundation import * from AppKit import * from PyObjCTools import NibClassBuilder, AppHelper jabberwocky = '''Twas brillig and the slithy toves did gyre and gimble in the wabe all mimsy were the borogroves and the mome raths outgrabe''' class SpeechDelegate(NSObject): def applicationDidFinishLaunching_(self, notification): synth = NSSpeechSynthesizer.alloc() synth = synth.initWithVoice_ ('com.apple.speech.synthesis.voice.Victoria') synth.startSpeakingString_(jabberwocky) app = NSApplication.sharedApplication() delegate = SpeechDelegate.alloc().init() app.setDelegate_(delegate) AppHelper.runEventLoop() /snippet ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Discussion of Python IDE's: strengths and weaknesses (long)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Wolfgang, - --- Riaan Booysen wrote: | | Kevin's comments here relate to an incorrect way in which subprocesses | were launced under OS X for those IDEs. | Riaan makes a good point here. Geoff Canyon offered a very useful hint on configuring the various Python IDE's to launch GUI programs. For instance, with Boa Constructor, you would set the path this way: /Library/Frameworks/Python.Framework/Versions/2.4/Resources/Python/Contents/MacOS/Python Wolfgang's question has prompted me to think more generally about each Python IDE for OS Xthat has been discussed. I've used, or tried to use, every one of them over the past several months, and I'd like to offer a brief discussion of each, plus some that have not been discussed at length. So, in no particular order: 1. Boa Constructor. This is the one that I've packaged most recently for OS X. I haven't yet done a real project in it, so I don't know all of its capabilities, but I can definitely say that it is a powerful tool that reflects several years of development work by Riaan and others. While its learning curve is not trivial, I found that just in following the getting started tutorial that I was able to create a simple wxPython GUI project more easily than with any other toolset. Boa is also, without a doubt, the best-documented of any open-source Python IDE that I've seen: its documents are clear, thorough, extremely extensive, and well-written. I can definitely understand the acclaim that Boa has gotten on other platforms. The work I've done with Boa has mainly been to get a stable configuration for it to run on OS X. As I noted above, I haven't worked with Boa as extensively as the other tools I've packaged, so there may be more work to be done with stability, identifying and fixing bugs, etc. There may also be limits to what can be done, limits that are attributable to the underlying wxPython/wxMac libraries. As I get more experience working with Boa, and as users continue to provide bug reports, I will be able to contribute more to the Mac version. 2. Spe, which also includes wxGlade and other tools. My most extensive experience has been with the Spe/wxGlade combination. Spe itself is a Python editor, and bundles the other programs (including wxGlade) to provide a complete environment. Spe's big strength, especially for wxPython development, is its code completion/code tips capability, and its class browsing features: both are well-done. I also like Spe's built-in console: it's my favorite tool for doing interactive playing/learning with Python. Here Spe's code-sense capabilities are also very helfpul. Supplementing Spe's general capabilities is wxGlade, which is a good GUI-building tool for wxWidgets. wxGlade does have a learning curve, but once you get a feel for how it works, it's useful for developing the GUI component of a wxPython script. It doesn't link widgets with events; you have to do that by hand. In the past wxGlade had serious stability issues on OS X; it would crash randomly, and frequently. The newest version (v. 0.4.0 in CVS, which includes some patches submitted by me) is more stable, and running it against the latest Python/wxPython versions also helps. I've been able to use it successfully on a couple of small projects. Spe also had stability issues, which have been reduced greatly by moving to the latest Python/wxPython. A plus for both Spe and wxGlade is that they provide good documentation. 3. Moving away from non-wxPython tools: Eric3 is a Python IDE that's written in PyQt, which I also maintain for the Mac. Eric3 is a very nice editing environment, including project management, integration with Qt's GUI building tools, unit testing, integration with CVS/Subversion, etc. These capabilities are marred by serious stability issues that I don't currently know how to address: it crashes constantly on OS X. I don't see these reports of chronic instability for Eric3 on Linux, so my guess it's related more to the underlying PyQt libraries. Qt 4 has just been released, with a version of PyQt 4 probably a few months away, so I'm hoping that an upgrade of Qt will help with Eric3's problems. Another conspicuous lack for Eric3 is documentation; I'm going to work on writing some basic documentation for this IDE, once I get it running reasonably well. The instability is a real shame, because it's a nice environment otherwise. 4. WingIDE: Wing is a (rather expensive) commercial IDE, and as you should expect, it doesn't have the stability issues. It also has all kinds of slick features, including code/class browsing, extensive and well-written documentation, and so on. Wing provides a free license for open-source development, which is nice. Wing's howling flaw is that it's a GTK-based (meaning X11) application, which I eventually found to be such a distraction that I stopped using it. Wing uses Aqua-type theming to try and fit in, but it still is uncomfortably jarring at least for me.
Re: [Pythonmac-SIG] Discussion of Python IDE's: strengths and weaknesses (long)
Hi Kevin, Thanks for that summary. Testing out all of these various IDEs has been on my to-do list for a long time, but I never seem to get around to it (I rely on vim and TextWrangler for most of my coding needs). It's very helpful to have a good summary of the features and status of the IDEs handy. --Dethe ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] [ANN] PyObjC 1.3.7
I've just uploaded PyObjC 1.3.7. This is a minor upgrade to PyObjC and features support for Xcode 2.1 in the Xcode templates, several new and improved framework wrappers, the port to Intel as well as some (minor) bugfixes. The new release can be downloaded from http:// pyobjc.sourceforge.net/ For those of you who live under a rock: PyObjC is a bridge between Python and Objective-C. It allows full featured Cocoa applications to be written in pure Python. It is also easy to use other frameworks containing Objective-C class libraries from Python and to mix in Objective-C, C and C++ source. The installer package includes a number of Xcode templates for easily creating new Cocoa-Python projects, as well as py2app, a suite of tools for building redistributable Python applications and plugins. Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Discussion of Python IDE's: strengths and weaknesses (long)
On Jul 6, 2005, at 5:27 PM, Russell E. Owen wrote: I plan to try Komodo when it arrives, but if it's written using Tcl/Tk then I worry that it won't be great on the Mac. Aqua Tcl/Tk has many cosmetic bugs that don't show any sign of getting fixed. On the other platforms Komodo supports, I'm pretty sure they use Mozilla Gecko. I would expect the same on the Mac...but Trent's on this list now, and he'd know for sure. :-) Gary ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Can MacPython 2.4.1 and Tiger's Python co-exist
I want to be able to create wxPython apps that can run on Tiger out of the box. That is, using the version of Python and wxWidgets that ship with Tiger. I also want to try Boa Constructor, but it requires MacPython 2.4.1 and wxWdigets 2.6.X Can I insall the latest MacPython and wxWidgets, but have it coexist with the original Tiger versions of these packages? What I'd like to do is use Python 2.4.1 for Boa Contructor, but be able to run any apps I create using the original MacPython that comes with Tiger and thus confirm that the apps would run on iger out-of-the-box. The ReadMe that comes with MacPythion says the executables would go in /usr/local/bin, but it seems that it will put some stuff within the /Library/Frameworks/Python.framework directory. In Windows, I would install the different Python versions to different directories. Same for wxWidgets. --- Derek M. A. Lee-Wo ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Can MacPython 2.4.1 and Tiger's Python co-exist
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes, you can install Macpython 2.4.1 and wxPython 2.6 separately from what ships with Apple. The Apple stuff in in /System/Frameworks. They will never see each other. I also use your strategy of developing with Python 2.4.1/wxPython 2.6 and testing/deploying against Py 2.3.5/wxPy 2.5. The Apple system installation is a very convenient deployment target. One caveat: the Apple system stuff is older, and especially (with wxPython) a bit buggier. That's why, for instance, Boa won't run on the Apple stuff. wxPython was a moving target until 2.6. However, I haven't seen any huge problems in the stuff I'm developing/working with. Your mileage may vary. 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] Derek Lee-Wo wrote: | I want to be able to create wxPython apps that can run on Tiger out of | the box. That is, using the version of Python and wxWidgets that ship | with Tiger. | | I also want to try Boa Constructor, but it requires MacPython 2.4.1 | and wxWdigets 2.6.X | | Can I insall the latest MacPython and wxWidgets, but have it coexist | with the original Tiger versions of these packages? What I'd like to | do is use Python 2.4.1 for Boa Contructor, but be able to run any apps | I create using the original MacPython that comes with Tiger and thus | confirm that the apps would run on iger out-of-the-box. | | The ReadMe that comes with MacPythion says the executables would go in | /usr/local/bin, but it seems that it will put some stuff within the | /Library/Frameworks/Python.framework directory. | | In Windows, I would install the different Python versions to different | directories. Same for wxWidgets. | | --- | Derek M. A. Lee-Wo | ___ | Pythonmac-SIG maillist - Pythonmac-SIG@python.org | http://mail.python.org/mailman/listinfo/pythonmac-sig | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCzFvMJmdQs+6YVcoRArXJAJ9hZF19IgUTt9dsWfRnGmW2Ntdr4QCfaGjH U41PaJKwpPp2iF3eCrijpN0= =ZvqH -END PGP SIGNATURE- ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Discussion of Python IDE's: strengths and weaknesses (long)
[Gary Poster wrote] On the other platforms Komodo supports, I'm pretty sure they use Mozilla Gecko. I would expect the same on the Mac...but Trent's on this list now, and he'd know for sure. :-) That's right: Komodo on OS X uses the Mozilla/Gecko runtime, which effective means that Komodo's UI uses native Carbon widgets. [Russell E. Owen wrote] I plan to try Komodo when it arrives, but if it's written using Tcl/Tk then I worry that it won't be great on the Mac. Aqua Tcl/Tk has many cosmetic bugs that don't show any sign of getting fixed. An aside on Tk on OS X: poke around here to see some of the Tcl/Tk work being done for native theming on OS X: http://tktable.sourceforge.net/tile/screenshots/macosx.html This work will be going into *Tcl* 8.5 (its next release). I'm not sure about Python's Tkinter, though. Cheers, Trent -- Trent Mick [EMAIL PROTECTED] ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Discussion of Python IDE's: strengths and weaknesses (long)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | | An aside on Tk on OS X: poke around here to see some of the Tcl/Tk work | being done for native theming on OS X: | http://tktable.sourceforge.net/tile/screenshots/macosx.html | | This work will be going into *Tcl* 8.5 (its next release). I'm not sure | about Python's Tkinter, though. | There's a Tkinter wrapper for Tile for here: http://mfranklin.is-a-geek.org/docs/Tile/Tile.py -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCzGjGJmdQs+6YVcoRAqpVAKCBrVE3rak3dNZ927mQbzKdN1q8ZQCfVp6j DvsHelb+8xjw8+hIfmSPrZ0= =/CZz -END PGP SIGNATURE- ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig