From berkowit@silcom.com Sun Dec 1 00:16:48 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Sat, 30 Nov 2002 16:16:48 -0800 Subject: [Pythonmac-SIG] Running Python scripts without full paths In-Reply-To: <5142AA4A-04B8-11D7-A154-000A27B19B96@oratrix.com> Message-ID: On 11/30/02 3:06 PM, "Jack Jansen" wrote: > And then Apple appeared on the Unix front and made things even more > difficult because they didn't want to mimic their > window-system-initialization on X11, probably because they didn't want > to depend on /bin/sh or /bin/csh in the login sequence, and they > invented environment.plist. > > And, of course, this is only the part of the story that I understand:-) Thank you, Jack. What appears to be happening in OS 10.2 is that tcsh's defaults override environment.plist for PATH settings, unless you override those in turn with a path customization in ~/Library/init/tcsh. It seems, according to Nicholas, that this does not happen in zsh. I will, in due course, discover what happens in bash since AppleScript's 'do shell script' command uses bash in 10.2 (in 10.1 it was zsh). Now that I have appended my scripts folder to my PATH in ~/Library/init/tcsh/path, I now see this in Terminal using /bin/tcsh -X -Y for new Terminal windows: set default_tcsh_initdir = /usr/share/tcsh/examples/ set default_tcsh_initdir = /usr/share/tcsh/examples/ set user_tcsh_initdir = ~/Library/init/tcsh set user_tcsh_initdir = ~/Library/init/tcsh if ( -r "${user_tcsh_initdir}" ) then if ( -r /Users/berkowit/Library/init/tcsh ) then set tcsh_initdir = "${user_tcsh_initdir}" set tcsh_initdir = /Users/berkowit/Library/init/tcsh whereas, earlier (before creating the path file), using /bin/tcsh -X ; if ( -r "${default_tcsh_initdir}/tcsh.defaults" ) then source "${default_tcsh_initdir}/tcsh.defaults" So it seems that the tcsh defaults override environment.plist for PATH (not PYTHONPATH), unless you set your own customizations. It all seems a bit inconsistent: why provide an environment.plist option that's not followed by certain shells? And why not create the environment.plist by default in the first place, I wonder? -- Paul Berkowitz From berkowit@music.ucsb.edu Sun Dec 1 00:19:42 2002 From: berkowit@music.ucsb.edu (Paul Berkowitz) Date: Sat, 30 Nov 2002 16:19:42 -0800 Subject: [Pythonmac-SIG] readline Message-ID: Now a more Python-specific question: Is there currently a way to get 'readline' to operate in the Python Interactive interpreter so I can navigate with arrow keys to make corrections, retain values, etc? I gather that we're all waiting for Python 2.3 to enable IDLE for Mac OS X, but is there a make-do readline facility in the meantime? -- Paul Berkowitz From njriley@uiuc.edu Sun Dec 1 02:53:17 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Sat, 30 Nov 2002 20:53:17 -0600 Subject: [Pythonmac-SIG] readline In-Reply-To: References: Message-ID: <20021201025316.GB2879058@uiuc.edu> --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Nov 30, 2002 at 04:19:42PM -0800, Paul Berkowitz wrote: > Now a more Python-specific question: > > Is there currently a way to get 'readline' to operate in the Python > Interactive interpreter so I can navigate with arrow keys to make > corrections, retain values, etc? I gather that we're all waiting for Python > 2.3 to enable IDLE for Mac OS X, but is there a make-do readline facility in > the meantime? You can link with the private readline.framework or (what I did) just compile readline from Fink and use that. The idlefork (www.sourceforge.net/projects/idlefork) version of IDLE works fine under a framework build of Python 2.2.2, barring a couple of cosmetic issues. Apply the attached patch to the latest CVS version of idlefork (fixes it to use pythonw and move the line/column numbers over to make room for the size box) and you should be all set. The changes aren't at all cleanly done but they work for me. After I downloaded WASTE and stuck it in the right place (a directory named 'waste' at the same level as the Python source directory) before building, the Python IDE even works from within the framework. Is there any documentation on building app wrappers? It's a bit confusing to have both IDLE and the Python IDE show up in the dock as "PythonInterpreter". -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="idle-python-2.2.2-patch.txt" Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.35 diff -c -r1.35 EditorWindow.py *** EditorWindow.py 23 Oct 2002 04:48:08 -0000 1.35 --- EditorWindow.py 1 Dec 2002 02:44:50 -0000 *************** *** 193,199 **** self.status_bar = self.MultiStatusBar(self.top) self.status_bar.set_label('column', 'Col: ?', side=RIGHT) self.status_bar.set_label('line', 'Ln: ?', side=RIGHT) ! self.status_bar.pack(side=BOTTOM, fill=X) self.text.bind('', self.set_line_and_column) self.text.bind('', self.set_line_and_column) self.text.after_idle(self.set_line_and_column) --- 193,199 ---- self.status_bar = self.MultiStatusBar(self.top) self.status_bar.set_label('column', 'Col: ?', side=RIGHT) self.status_bar.set_label('line', 'Ln: ?', side=RIGHT) ! self.status_bar.pack(side=BOTTOM, fill=X, padx=14) self.text.bind('', self.set_line_and_column) self.text.bind('', self.set_line_and_column) self.text.after_idle(self.set_line_and_column) Index: MultiStatusBar.py =================================================================== RCS file: /cvsroot/idlefork/idle/MultiStatusBar.py,v retrieving revision 1.3 diff -c -r1.3 MultiStatusBar.py *** MultiStatusBar.py 13 Jul 2001 17:52:08 -0000 1.3 --- MultiStatusBar.py 1 Dec 2002 02:44:50 -0000 *************** *** 10,16 **** def set_label(self, name, text='', side=LEFT): if not self.labels.has_key(name): ! label = Label(self, bd=1, relief=SUNKEN, anchor=W) label.pack(side=side) self.labels[name] = label else: --- 10,16 ---- def set_label(self, name, text='', side=LEFT): if not self.labels.has_key(name): ! label = Label(self, bd=1, relief=SUNKEN, anchor=W, font=('Geneva', 9, '')) label.pack(side=side) self.labels[name] = label else: Index: PyShell.py =================================================================== RCS file: /cvsroot/idlefork/idle/PyShell.py,v retrieving revision 1.35 diff -c -r1.35 PyShell.py *** PyShell.py 30 Nov 2002 18:49:10 -0000 1.35 --- PyShell.py 1 Dec 2002 02:44:53 -0000 *************** *** 285,293 **** # # Instead, find the executable by looking relative to # sys.prefix. ! executable = os.path.join(sys.prefix, 'Resources', ! 'Python.app', 'Contents', ! 'MacOS', 'python') return executable else: return sys.executable --- 285,294 ---- # # Instead, find the executable by looking relative to # sys.prefix. ! #executable = os.path.join(sys.prefix, 'Resources', ! # 'Python.app', 'Contents', ! # 'MacOS', 'python') ! executable = os.path.join(sys.prefix, 'bin', 'python') return executable else: return sys.executable Index: TreeWidget.py =================================================================== RCS file: /cvsroot/idlefork/idle/TreeWidget.py,v retrieving revision 1.5 diff -c -r1.5 TreeWidget.py *** TreeWidget.py 30 Nov 2002 19:04:06 -0000 1.5 --- TreeWidget.py 1 Dec 2002 02:44:53 -0000 *************** *** 248,254 **** label = self.label except AttributeError: # padding carefully selected (on Windows) to match Entry widget: ! self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2) if self.selected: self.label.configure(fg="white", bg="darkblue") else: --- 248,254 ---- label = self.label except AttributeError: # padding carefully selected (on Windows) to match Entry widget: ! self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2, font=('', 11, '')) if self.selected: self.label.configure(fg="white", bg="darkblue") else: Index: idle =================================================================== RCS file: /cvsroot/idlefork/idle/idle,v retrieving revision 1.3 diff -c -r1.3 idle *** idle 17 Jul 2001 04:59:01 -0000 1.3 --- idle 1 Dec 2002 02:44:53 -0000 *************** *** 1,4 **** ! #! /usr/bin/env python import PyShell PyShell.main() --- 1,4 ---- ! #! /usr/bin/env pythonw import PyShell PyShell.main() --NzB8fVQJ5HfG6fxh-- From berkowit@silcom.com Sun Dec 1 03:18:25 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Sat, 30 Nov 2002 19:18:25 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: <20021201025316.GB2879058@uiuc.edu> Message-ID: On 11/30/02 6:53 PM, "Nicholas Riley" wrote: > You can link with the private readline.framework or (what I did) just > compile readline from Fink and use that. > > The idlefork (www.sourceforge.net/projects/idlefork) version of IDLE > works fine under a framework build of Python 2.2.2, barring a couple > of cosmetic issues. Apply the attached patch to the latest CVS > version of idlefork (fixes it to use pythonw and move the line/column > numbers over to make room for the size box) and you should be all set. > The changes aren't at all cleanly done but they work for me. Thank you again, Nicholas. I'm afraid I'm stuck in Python 2.2 for the moment: I will be wanting to include python -c commands in 'do shell script' in an AppleScript Studio app, and I have to know that they will work the same with the built-in Python on users' machines as in my own. I don't mind requiring a particular OS version at the time I release the app (which won't be for a good long while, so maybe we'll be up to OS 10.2 and Python 2.3 by that point), but no special installations for users. Now - what does "link with the private readline.framework" mean? Does someone here know how to do that? Dan Wolfe mentioned something about "installing readline 4.2 or 4.3". I'd like to do something that lets me use readline without otherwise changing Python 2.2 for now, if that's possible. May thanks for all you help. -- Paul Berkowitz From berkowit@silcom.com Sun Dec 1 03:24:12 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Sat, 30 Nov 2002 19:24:12 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: <20021201025316.GB2879058@uiuc.edu> Message-ID: On 11/30/02 7:18 PM, I wrote: > I don't mind requiring a particular OS version at the time I release the > app (which won't be for a good long while, so maybe we'll be up to OS 10.2 > and Python 2.3 by that point), but no special installations for users. Yet another typo - sorry. That should have read "OS 10.3". -- Paul Berkowitz From njriley@uiuc.edu Sun Dec 1 03:46:22 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Sat, 30 Nov 2002 21:46:22 -0600 Subject: [Pythonmac-SIG] readline In-Reply-To: References: <20021201025316.GB2879058@uiuc.edu> Message-ID: <20021201034621.GC2879058@uiuc.edu> On Sat, Nov 30, 2002 at 07:18:25PM -0800, Paul Berkowitz wrote: > Now - what does "link with the private readline.framework" mean? Edit Modules/Setup and include "-F/System/Library/PrivateFrameworks -framework readline" in the line for readline, then make sharedmods; make install. If you're doing a framework install of Python 2.2.x, you also need to change Makefile.pre.in as follows: [...] # This rule is here for OPENSTEP/Rhapsody/MacOSX $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): $(LIBRARY) $(PYTHONFRAMEWORKDIR) libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) $(LOCALMODLIBS) \ -framework System @LIBTOOL_CRUFT@ The important part is to add $(LOCALMODLIBS). There might be a simpler way to do this without reinstalling all of Python but I don't know about it. > Does someone here know how to do that? Dan Wolfe mentioned something > about "installing readline 4.2 or 4.3". I'd like to do something > that lets me use readline without otherwise changing Python 2.2 for > now, if that's possible. If you've got Fink, just 'fink install readline', and change the readline line in Modules/Setup to something like this: readline readline.c -L/sw/lib -I/sw/include -lreadline -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From berkowit@music.ucsb.edu Sun Dec 1 04:07:16 2002 From: berkowit@music.ucsb.edu (Paul Berkowitz) Date: Sat, 30 Nov 2002 20:07:16 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: <20021201034621.GC2879058@uiuc.edu> Message-ID: On 11/30/02 7:46 PM, "Nicholas Riley" wrote: > On Sat, Nov 30, 2002 at 07:18:25PM -0800, Paul Berkowitz wrote: >> Now - what does "link with the private readline.framework" mean? > > Edit Modules/Setup and include "-F/System/Library/PrivateFrameworks > -framework readline" in the line for readline, then make sharedmods; > make install. If you're doing a framework install of Python 2.2.x, > you also need to change Makefile.pre.in as follows: > > [...] > # This rule is here for OPENSTEP/Rhapsody/MacOSX > $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): > $(LIBRARY) $(PYTHONFRAMEWORKDIR) > libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) > $(LIBRARY) $(LOCALMODLIBS) \ > -framework System @LIBTOOL_CRUFT@ > > The important part is to add $(LOCALMODLIBS). There might be a > simpler way to do this without reinstalling all of Python but I don't > know about it. I'm afraid I don't have any Modules/Setup anywhere. I just have the default installation of python 2.2 in OS 10.2: I never installed it myself, and have no installation files or folders. > >> Does someone here know how to do that? Dan Wolfe mentioned something >> about "installing readline 4.2 or 4.3". I'd like to do something >> that lets me use readline without otherwise changing Python 2.2 for >> now, if that's possible. > > If you've got Fink, just 'fink install readline', and change the > readline line in Modules/Setup to something like this: > > readline readline.c -L/sw/lib -I/sw/include -lreadline Hmmm. What's Fink? (This seems to be rapidly spiraling out of all my fields of reference. I really am very new to Unix.) And there's that Modules/Setup again. Is this the same readline as GNU readline? -- Paul Berkowitz From dkwolfe@pacbell.net Sun Dec 1 04:20:48 2002 From: dkwolfe@pacbell.net (Dan Wolfe) Date: Sat, 30 Nov 2002 20:20:48 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: Message-ID: <450040BD-04E4-11D7-9713-003065ABC53C@pacbell.net> That's the missing piece of info... your requirement to be compatible with the base 10.2 Python 2.2 install from an Applescript 'do shell script' command. My suggestion to just install readline 4.3 was based on the premise that you'd be installing a new version of Python on your own machine... with other users machines... well, that's a whole new ball game. :-) For development work, if you want readline/ssl support, you can just compile a new version of python and install it. All you need to do is A) avoid any post 2.2 python features and B) have a separate machine/virgin partition to test out your Applescript.app/python code to make sure you didn't use anything not installed on a regular system. :-) If you want to use readline/SSL in your python scripts without any extra installs, I'm not sure that there's anything you can do as almost every workaround I've heard about requires an install. Bill Bumgarner has a few hints and pointers on his rants pages about getting readline/SSL to work with the current install.... as well as some few other things you might be interested in. In particular, look at the following pages: http://radio.weblogs.com/0100490/2002/10/16.html http://radio.weblogs.com/0100490/2002/09/25.html I haven't tested them but knowing Bill, they should work. ;-) - Dan On Saturday, November 30, 2002, at 07:18 PM, Paul Berkowitz wrote: > Thank you again, Nicholas. I'm afraid I'm stuck in Python 2.2 for the > moment: I will be wanting to include python -c commands in 'do shell > script' > in an AppleScript Studio app, and I have to know that they will work > the > same with the built-in Python on users' machines as in my own. I don't > mind > requiring a particular OS version at the time I release the app (which > won't > be for a good long while, so maybe we'll be up to OS 10.2 and Python > 2.3 by > that point), but no special installations for users. > > Now - what does "link with the private readline.framework" mean? Does > someone here know how to do that? Dan Wolfe mentioned something about > "installing readline 4.2 or 4.3". I'd like to do something that lets > me use > readline without otherwise changing Python 2.2 for now, if that's > possible. From dmlsj@yahoo.com Sun Dec 1 04:28:23 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Sat, 30 Nov 2002 20:28:23 -0800 Subject: [Pythonmac-SIG] Running Python scripts without full paths In-Reply-To: <5142AA4A-04B8-11D7-A154-000A27B19B96@oratrix.com> Message-ID: <5409E012-04E5-11D7-A9F3-003065D5C90C@yahoo.com> And, worse yet, when Apple implemented their repelace, they didn't think about variable expansion so user customizations like "~" and environment variables that owrk on all other systems like ${CLASSPATH} and ${PYTHONPATH} are inert in a plist further messing things up. Perhaps an application of the Law of Unintended Consequences. But is sure makes life on OS X difficult. On Saturday, Nov 30, 2002, at 15:06 US/Pacific, Jack Jansen wrote: > > On zaterdag, nov 30, 2002, at 21:00 Europe/Amsterdam, kevin parks > wrote: > >> Someone who really understands this ought to put something up on the >> web on this! > > The problem is that noone really understands it:-( > > As I have my historian's hat on today anyway, let me explain a bit how > we got in the mess we are now. > > Initially there was .profile for /bin/sh (only read when a login shell > started), .login for csh (only read when a login shell started) and > .cshrc for csh (only read when the shell was *not* a login shell). To > simplify matters we'll forget about the bourne shell and its brethren > (bash, zsh, esh, many more). > > The csh and its descendents (like tcsh) added system-wide default > initialization files (/etc/csh.login and /etc/csh.cshrc). Tcsh > complicated matters, because whereas it shared .login with csh, it > would prefer a .tcshrc file over a .cshrc file (but fallback to the > latter if the former didn't exist). Then came windowing systems like > X11, which would start up applications before anything resembling a > "login shell" appeared, and you wanted to be able to set environment > variables there too. So now there were three initialization files: > .login (login shells), .cshrc (non-login shells) and something else > for the windowing system (often .xinitrc, but there's other > possibilities too:-). At this point some systems tried to rationalize > things and provided /etc/profile.d, which was read by /etc/csh.login > as well as the equivalents for all other shells as well as by the > window system startup. At least: each read the bits it thought it > required. And each of the files in /etc/profile.d could be overridden > in your home directory (just as /etc/csh.login could be overridden by > .login). But then people who wanted a custom .login needed to get bits > and pieces from /etc/profile.d themselves, because .login replaces > /etc/csh.login, in doesn't add to it. So by this time it was one big > giant mess, and the only surefire way to get a working set of > initialization files was to keep experimenting until you had something > that worked, and then *never* *ever* touch that again (at least not > structurally). > > And then Apple appeared on the Unix front and made things even more > difficult because they didn't want to mimic their > window-system-initialization on X11, probably because they didn't want > to depend on /bin/sh or /bin/csh in the login sequence, and they > invented environment.plist. > > And, of course, this is only the part of the story that I understand:-) > -- > - Jack Jansen > http://www.cwi.nl/~jack - > - If I can't dance I don't want to be part of your revolution -- Emma > Goldman - > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From dmlsj@yahoo.com Sun Dec 1 04:33:55 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Sat, 30 Nov 2002 20:33:55 -0800 Subject: [Pythonmac-SIG] Running Python scripts without full paths In-Reply-To: <5409E012-04E5-11D7-A9F3-003065D5C90C@yahoo.com> Message-ID: <19D5D9A1-04E6-11D7-A9F3-003065D5C90C@yahoo.com> Sorry for the typos--I really shouldn't try to send mail while holding a squirming three-year-old in my lap ;-) On Saturday, Nov 30, 2002, at 20:28 US/Pacific, Daniel Lord wrote: > And, worse yet, when Apple implemented their repelace, they didn't > think about variable expansion so user customizations like "~" and > environment variables that owrk on all other systems like ${CLASSPATH} > and ${PYTHONPATH} are inert in a plist further messing things up. > Perhaps an application of the Law of Unintended Consequences. But is > sure makes life on OS X difficult. > From njriley@uiuc.edu Sun Dec 1 04:38:19 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Sat, 30 Nov 2002 22:38:19 -0600 Subject: [Pythonmac-SIG] readline In-Reply-To: References: <20021201034621.GC2879058@uiuc.edu> Message-ID: <20021201043819.GD2879058@uiuc.edu> On Sat, Nov 30, 2002 at 08:07:16PM -0800, Paul Berkowitz wrote: > On 11/30/02 7:46 PM, "Nicholas Riley" wrote: > > The important part is to add $(LOCALMODLIBS). There might be a > > simpler way to do this without reinstalling all of Python but I don't > > know about it. > > I'm afraid I don't have any Modules/Setup anywhere. I just have the default > installation of python 2.2 in OS 10.2: I never installed it myself, and have > no installation files or folders. I misunderstood your last post when you talked about IDLE. It requires a framework build for the Aqua GUI, which isn't what Apple ships. Modules/Setup is a file in the Python source which you edit to enable modules. > Hmmm. What's Fink? (This seems to be rapidly spiraling out of all my fields > of reference. I really am very new to Unix.) And there's that Modules/Setup > again. > Is this the same readline as GNU readline? Yes. I'd recommend you just forget about building the readline module if you don't want to replace the built-in Python 2.2... perhaps someone with more experience can suggest if it's possible to build the readline module separately and link it with the Apple-supplied Python. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From berkowit@silcom.com Sun Dec 1 07:04:42 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Sat, 30 Nov 2002 23:04:42 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: <450040BD-04E4-11D7-9713-003065ABC53C@pacbell.net> Message-ID: On 11/30/02 8:20 PM, "Dan Wolfe" wrote: > If you want to use readline/SSL in your python scripts without any > extra installs, I'm not sure that there's anything you can do as almost > every workaround I've heard about requires an install. Bill Bumgarner > has a few hints and pointers on his rants pages about getting > readline/SSL to work with the current install.... as well as some few > other things you might be interested in. In particular, look at the > following pages: > > http://radio.weblogs.com/0100490/2002/10/16.html > http://radio.weblogs.com/0100490/2002/09/25.html > > I haven't tested them but knowing Bill, they should work. ;-) It does. Thanks you. I just installed it. It uses readline from Python 2.2.1 and installs it into the built-in Python 2.2 in OS 10.2 in an instant. Now I can develop my Python segments in a more human manner before converting them (or running them as .py files) in 'do shell script' in AppleScript and AS Studio. This is great. Now - where do I find out what to do with it? I see that my left and right arrows work immediately in the Python interpreter but not the up-arrow. (Nor does control-P, which I thought I read somewhere put the cursor up a line.) Thanks for the links, Dan. -- Paul Berkowitz From berkowit@silcom.com Sun Dec 1 21:10:51 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Sun, 01 Dec 2002 13:10:51 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: <450040BD-04E4-11D7-9713-003065ABC53C@pacbell.net> Message-ID: On 11/30/02 11:04 PM, I wrote: >> http://radio.weblogs.com/0100490/2002/10/16.html >> http://radio.weblogs.com/0100490/2002/09/25.html >> >> I haven't tested them but knowing Bill, they should work. ;-) > > It does. Thank you. I just installed it. It uses readline from Python > 2.2.1 and installs it into the built-in Python 2.2 in OS 10.2 in an > instant. Now I can develop my Python segments in a more human manner > before converting them (or running them as .py files) in 'do shell script' > in AppleScript and AS Studio. This is great. > > Now - where do I find out what to do with it? I see that my left and right > arrows work immediately in the Python interpreter but not the up-arrow. > (Nor does control-P, which I thought I read somewhere put the cursor up a > line.) > OK. I've seen in Appendix A to the Python Tutorial () how to use control-P to access an input line higher up in the buffer. It retypes it on the current line. But I don't understand how to edit the line as described: after altering the line, if I press Return I get a syntax error (the line was in the middle of a function def); if I press control-N repeatedly until I get back to the bottom of the buffer, nothing gets edited. Is there somewhere that describes the procedure to use and its limitations, which perhaps I'm exceeding here? -- Paul Berkowitz From skip@pobox.com Sun Dec 1 21:25:14 2002 From: skip@pobox.com (Skip Montanaro) Date: Sun, 1 Dec 2002 15:25:14 -0600 Subject: [Pythonmac-SIG] readline In-Reply-To: References: <450040BD-04E4-11D7-9713-003065ABC53C@pacbell.net> Message-ID: <15850.32314.527912.896639@montanaro.dyndns.org> Paul> But I don't understand how to edit the line as described: after Paul> altering the line, if I press Return I get a syntax error (the Paul> line was in the middle of a function def); The readline interface is pretty dumb. In particular, you can't edit compound statements as a group. You have to reenter the lines prior to the line you want to edit (generally using Ctl-P or Ctl-R to search for them), then correct the line with the mistake. If you find this cumbersome (and you should if you need to reenter more than a line or two), just break down and edit your code in a file, say, mymod.py. Once you make the desired corrections and save the file, you can reload it by executing reload(mymod) at the interpreter prompt. -- Skip Montanaro - skip@pobox.com http://www.mojam.com/ http://www.musi-cal.com/ From berkowit@silcom.com Sun Dec 1 21:33:05 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Sun, 01 Dec 2002 13:33:05 -0800 Subject: [Pythonmac-SIG] readline In-Reply-To: <15850.32314.527912.896639@montanaro.dyndns.org> Message-ID: On 12/1/02 1:25 PM, "Skip Montanaro" wrote: > > Paul> But I don't understand how to edit the line as described: after > Paul> altering the line, if I press Return I get a syntax error (the > Paul> line was in the middle of a function def); > > The readline interface is pretty dumb. In particular, you can't edit > compound statements as a group. You have to reenter the lines prior to the > line you want to edit (generally using Ctl-P or Ctl-R to search for them), > then correct the line with the mistake. > > If you find this cumbersome (and you should if you need to reenter more than > a line or two), just break down and edit your code in a file, say, > mymod.py. Once you make the desired corrections and save the file, you can > reload it by executing > > reload(mymod) > > at the interpreter prompt. (After first having imported it in the first place, yes.) I'll probably end up mostly doing that once I get the hang of more basic scripting. The docs refer to the edited line being displayed with an asterisk - I haven't seen that yet, even editing a single line. When does that happen? -- Paul Berkowitz From niel_mayhew@mac.com Mon Dec 2 06:25:35 2002 From: niel_mayhew@mac.com (Neil Mayhew) Date: Sun, 01 Dec 2002 23:25:35 -0700 Subject: [Pythonmac-SIG] Running Python scripts without full paths In-Reply-To: <19D5D9A1-04E6-11D7-A9F3-003065D5C90C@yahoo.com> Message-ID: I'm a bit late with this contribution, but I hope a few points may still be helpful. 1. Changes to environment variables like PATH only last for the lifetime of the current shell (and its descendents). So commands like "setenv PATH ..." won't have any permanent effect. 2. ~/.MacOS/environment.plist is intended primarily for apps running in the GUI. I assume it is read by WindowServer and/or loginwindow.app, and these are the parent processes of all the other GUI processes (as shown by the PPID column in ps -xl). 3. Although Terminal is a GUI app, the shell running inside it is not. And Terminal's environment is not the same as the shell's environment. 4. If you have the Terminal preference "Execute the default login shell using /usr/bin/login" set, your shell starts with a completely fresh environment (this is how login is supposed to behave) and environment.plist does not apply. 5. What happens to your environment from there on depends entirely on the initialization sequence used by your chosen shell. I use bash, because it is the standard, because it's also the default shell on the linux boxes I use, and because I don't like tcsh :-). The man pages for bash (and also, I presume, for tcsh) specify quite clearly what the initialization sequence is supposed to be. This is not an Apple thing, but a shell thing. In the past, some of the manpages supplied with OS X were out of sync with the programs they documented, but Apple has supposedly fixed all of this. 6. If you don't have the "login" Terminal preference set, you are much less likely to get a consistent environment in your shell, especially across OS upgrades. With login, you get to control everything precisely. 7. If you want to change your preferred shell (hint, hint :-) the correct way to do this is using Netinfo Manager. That way you get the same shell however you log in (including remote login via SSH, useful for escaping from 'stuck' situations without hitting the reset switch). 8. The logical place to set up extra path directories and suchlike is in your shell's login initialization files. There's usually no need to do this for GUI programs since they aren't using PATH to find things. There are exceptions, such as AppleScripts that use "do shell script", but these will always be fragile if they rely on certain directories being externally set in the PATH. It's better to use ~ expansion, absolute paths, or AppleScript's "path to me" to concoct absolute paths. If you use AppleScript Studio to develop your scripts, then you can put the python, shell, etc. scripts into the app's bundle (in the Resource directory) and use bundle APIs to locate them. 9. It's a known problem with cron that environment, path, limits, etc. are rather unpredictable, especially between different systems, or different configurations. It's better to have cron run a shell script which then creates a suitable environment for whatever program you actually want to run. 10. As has already been pointed out, your commands to add directories to the path should always ADD to what's already there, not replace it. 11. Most systems by default do not include the current directory in the path. Thus it is necessary to type ./foo instead of just foo. This is for security, to stop people spoofing you by putting a script called "ls" into your home directory that prints nothing (think about it). This was a favorite trick to play on friends when I first started using Unix, way back. Of course, more sinister tricks can be played by those with malicious intent. The trailing (or leading) : in the path is to include the current directory (ie an empty prefix on whatever command you typed). I hope this is helpful. And apologies to everyone else for starting up this extensive off-topic discussion again. --Neil niel_mayhew@mac.com (address deliberately misspelled to foil spammers) From dyoo@hkn.eecs.berkeley.edu Mon Dec 2 08:11:03 2002 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Mon, 2 Dec 2002 00:11:03 -0800 (PST) Subject: [Pythonmac-SIG] [Tutor] Rut Ro... (fwd) Message-ID: Hi darksyyyde, You asked about using Cocoa on Python-tutor, but your question may be more suited to the pythonmac-sig, since it is a bit specialized. I'll forward it off to pythonmac-sig for your convenience. The people on pythonmac-sig should know more about getting Cocoa and Python to work nicely together, and I hope you get some good answers. Best of wishes to you! ---------- Forwarded message ---------- Date: Fri, 29 Nov 2002 11:32:44 -0700 From: darksyyyde To: tutor@python.org Subject: [Tutor] Rut Ro... RubyCocoa is a Ruby library for using Cocoa Objects on Mac OS X http://www.imasy.or.jp/~hisa/mac/rubycocoa/ Why hasn't Python done something like this?? I haven't been able to get tkinter to work with OSX, and Python libraries for using Cocoa Objects would make it irrelevant. And far superior. The above link has a nice screen shot of a simple app written in Ruby that uses the OSX Cocoa GUI. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor From jwt@qth.ath.cx Mon Dec 2 08:57:24 2002 From: jwt@qth.ath.cx (Jim Tittsler) Date: Mon, 2 Dec 2002 17:57:24 +0900 Subject: [Pythonmac-SIG] [Tutor] Rut Ro... (fwd) In-Reply-To: References: Message-ID: <20021202085724.GA5489@server.onjapan.net> On Mon, Dec 02, 2002 at 12:11:03AM -0800, Danny Yoo wrote: > RubyCocoa is a Ruby library for using Cocoa Objects on Mac OS X > > http://www.imasy.or.jp/~hisa/mac/rubycocoa/ > > Why hasn't Python done something like this?? Check out the PyObjc project at http://pyobjc.sf.net/ PyObjc provides a bridge between Objective-C and Python. You can use it to write a Cocoa-based application in Python. From brian_l@mac.com Mon Dec 2 09:05:10 2002 From: brian_l@mac.com (Brian Lenihan) Date: Mon, 2 Dec 2002 01:05:10 -0800 Subject: [Pythonmac-SIG] [Tutor] Rut Ro... (fwd) In-Reply-To: Message-ID: <2902E6F8-05D5-11D7-80BA-003065F88956@mac.com> You are probably looking for this: http://pyobjc.sf.net On Monday, December 2, 2002, at 12:11 AM, Danny Yoo wrote: > Hi darksyyyde, > > You asked about using Cocoa on Python-tutor, but your question may be > more > suited to the pythonmac-sig, since it is a bit specialized. I'll > forward > it off to pythonmac-sig for your convenience. > > The people on pythonmac-sig should know more about getting Cocoa and > Python to work nicely together, and I hope you get some good answers. > > Best of wishes to you! > > > > ---------- Forwarded message ---------- > Date: Fri, 29 Nov 2002 11:32:44 -0700 > From: darksyyyde > To: tutor@python.org > Subject: [Tutor] Rut Ro... > > RubyCocoa is a Ruby library for using Cocoa Objects on Mac OS X > > http://www.imasy.or.jp/~hisa/mac/rubycocoa/ > > Why hasn't Python done something like this?? > > I haven't been able to get tkinter to work with OSX, > and Python libraries for using Cocoa Objects would make > it irrelevant. And far superior. > The above link has a nice screen shot of a simple app > written in Ruby that uses the OSX Cocoa GUI. > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From mwh@python.net Mon Dec 2 15:11:06 2002 From: mwh@python.net (Michael Hudson) Date: 02 Dec 2002 15:11:06 +0000 Subject: [Pythonmac-SIG] readline In-Reply-To: Skip Montanaro's message of "Sun, 1 Dec 2002 15:25:14 -0600" References: <450040BD-04E4-11D7-9713-003065ABC53C@pacbell.net> <15850.32314.527912.896639@montanaro.dyndns.org> Message-ID: <2mof84jw1h.fsf@starship.python.net> Skip Montanaro writes: > The readline interface is pretty dumb. In particular, you can't edit > compound statements as a group. You have to reenter the lines prior to the > line you want to edit (generally using Ctl-P or Ctl-R to search for them), > then correct the line with the mistake. Cue pyrepl plug: http://starship.python.net/crew/mwh/hacks/pyrepl.html It's similar to readline, but does multi-line editing. I haven't tried it on 10.2; I use it all the time in Terminal.app on 10.1, though. Cheers, M. -- Remember - if all you have is an axe, every problem looks like hours of fun. -- Frossie -- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html From francois.granger@free.fr Mon Dec 2 17:21:13 2002 From: francois.granger@free.fr (Fran=?ISO-8859-1?B?5w==?=ois Granger) Date: Mon, 02 Dec 2002 18:21:13 +0100 Subject: [Pythonmac-SIG] Database engine Message-ID: On the Spambayes mailing list there was a discussion about the quality of the current bsddb database engine on Windows platforms. I was asked the question of how it is on Mac OS9 side. All I could say is that anydbm rely on gdbm. But I don't know which engine it is. Anyone knows a little on this ? -- Le courrier est un moyen de communication. Les gens devraient se poser des questions sur les implications politiques des choix (ou non choix) de leurs outils et technologies. Pour des courriers propres : -- From oussoren@cistron.nl Mon Dec 2 18:06:15 2002 From: oussoren@cistron.nl (Ronald Oussoren) Date: Mon, 2 Dec 2002 19:06:15 +0100 Subject: [Pythonmac-SIG] [Tutor] Rut Ro... (fwd) In-Reply-To: Message-ID: On Monday, Dec 2, 2002, at 09:11 Europe/Amsterdam, Danny Yoo wrote: > ---------- Forwarded message ---------- > Date: Fri, 29 Nov 2002 11:32:44 -0700 > From: darksyyyde > To: tutor@python.org > Subject: [Tutor] Rut Ro... > > RubyCocoa is a Ruby library for using Cocoa Objects on Mac OS X > > http://www.imasy.or.jp/~hisa/mac/rubycocoa/ > > Why hasn't Python done something like this?? Guido's timemachine should be usefull here... OK done, see: http://pyobjc.sourceforge.net PyObjC is a module that allows full access to Objective-C classes, including subclassing from those classes. We don't have screenshots on the website yet, but building GUI apps is quite easy. Ronald From kevino@tulane.edu Mon Dec 2 18:28:37 2002 From: kevino@tulane.edu (Kevin Ollivier) Date: Mon, 2 Dec 2002 13:28:37 -0500 Subject: [Pythonmac-SIG] [Tutor] Rut Ro... (fwd) In-Reply-To: Message-ID: Several others have already pointed out the PyObjC bridge, but I thought I would also mention wxPython, a GUI toolkit that runs on Windows, Mac (OS X) and Linux. URL is: http://www.wxpython.org Kevin On Monday, December 2, 2002, at 03:11 AM, Danny Yoo wrote: > Hi darksyyyde, > > You asked about using Cocoa on Python-tutor, but your question may be > more > suited to the pythonmac-sig, since it is a bit specialized. I'll > forward > it off to pythonmac-sig for your convenience. > > The people on pythonmac-sig should know more about getting Cocoa and > Python to work nicely together, and I hope you get some good answers. > > Best of wishes to you! > > > > ---------- Forwarded message ---------- > Date: Fri, 29 Nov 2002 11:32:44 -0700 > From: darksyyyde > To: tutor@python.org > Subject: [Tutor] Rut Ro... > > RubyCocoa is a Ruby library for using Cocoa Objects on Mac OS X > > http://www.imasy.or.jp/~hisa/mac/rubycocoa/ > > Why hasn't Python done something like this?? > > I haven't been able to get tkinter to work with OSX, > and Python libraries for using Cocoa Objects would make > it irrelevant. And far superior. > The above link has a nice screen shot of a simple app > written in Ruby that uses the OSX Cocoa GUI. > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From bbum@codefab.com Tue Dec 3 17:10:17 2002 From: bbum@codefab.com (Bill Bumgarner) Date: Tue, 3 Dec 2002 12:10:17 -0500 Subject: [Pythonmac-SIG] Re: Ru Ro In-Reply-To: <20021203170004.14319.66923.Mailman@mail.python.org> Message-ID: <18D1FD38-06E2-11D7-B46E-000393877AE4@codefab.com> And we are [thanks in large to Ronald] way ahead of the Ruby or Perl bridges... we do subclassing, we handle complex structures, we transparently work with PB.... ... we *really* need to cut a new version. I'm going to go ahead and do so at end of week regardless of state --- call it 0.8.0 -- assuming nothing is horrendously broken. On Tuesday, December 3, 2002, at 12:00 PM, pythonmac-sig-request@python.org wrote: >> RubyCocoa is a Ruby library for using Cocoa Objects on Mac OS X From eppstein@ics.uci.edu Tue Dec 3 19:51:18 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Tue, 03 Dec 2002 11:51:18 -0800 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? Message-ID: <81037743.1038916278@dhcp31-169.ics.uci.edu> Whenever I look through the archives of this list, or elsewhere on the net, I see: a big mess of multiple versions of Python, in varying states of development, OS-X friendliness and installability, with multiple different UI systems. OS X.2 itself has a python pre-installed (yay!), but unfortunately without UI components. My specific situation is as a developer of a large genealogy program (in C++, for Classic MacOS) that I would like to make native for OS X. This requires a massive rewriting of code and it's beginning to look like it might be easier to start over from scratch in a friendlier programming language. In order to do this in Python, I would need: - OS X native look and feel - Easy download and installation by computer-challenged senior citizens (e.g. standalone app with gzipped download size < 2Mb, no installation of other packages or complicated command lines) - Transparent input and display of accented characters - Multiple windows mixing multi-font text and vector graphics, with ability to capture mouse click location within window It would also be helpful, but not essential, to have cross-platform portability, display or editing of basic HTML text formatting, ability to convert contents of vector graphic windows to bitmap image files, and ability to distribute the program as closed source. Is anything like this available now? If so, which version of Python should I be looking at, and where are the easy installation instructions? If not, will it be available any time soon, or should I be looking around for non-Python alternative solutions? -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From Jack.Jansen@oratrix.com Tue Dec 3 21:24:30 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Tue, 3 Dec 2002 22:24:30 +0100 Subject: [Pythonmac-SIG] Database engine In-Reply-To: Message-ID: <9BFF21F2-0705-11D7-BF9B-000A27B19B96@oratrix.com> On maandag, dec 2, 2002, at 18:21 Europe/Amsterdam, Fran=E7ois Granger=20= wrote: > On the Spambayes mailing list there was a discussion about the quality=20= > of > the current bsddb database engine on Windows platforms. I was asked = the > question of how it is on Mac OS9 side. All I could say is that anydbm=20= > rely > on gdbm. But I don't know which engine it is. > > Anyone knows a little on this ? It's the gdbm engine. This is a GNU database engine of approximately=20 10-12 years old. It used to be popular in its day, but nowadays most=20 people seem to prefer bsddb. But gdbm was reasonably easy to port to=20 MacOS9, and I never looked at bsddb afterwards. -- - Jack Jansen =20 http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma=20 Goldman - From Jack.Jansen@oratrix.com Tue Dec 3 21:41:06 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Tue, 3 Dec 2002 22:41:06 +0100 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? In-Reply-To: <81037743.1038916278@dhcp31-169.ics.uci.edu> Message-ID: If you are developing a turnkey application I think I would suggest PyObjC. It can build on the installed /usr/bin/python, and an application in PyObjC will fit all your requirements (possibly with the exception of the 2MB download, I'm not 100% sure of that). Building a fullblown application with PyObjC still has a few rough edges, but they're being ironed out quickly. Cross-platform is out of the question with Cocoa, though. If that is important to you you'll have to wait for either MacPython-OSX 2.2 or MacPython-OSX 2.3, both scheduled to go to alfa in another month. (The difference is that 2.2 will build on the Apple's pre-installed /usr/bin/python). And then you'll have to add wxPython or Tkinter, both of which are still a bit shaky (at least: they were the last time I looked). And with these solutions I won't vouch for their handling of accented characters and such. On dinsdag, dec 3, 2002, at 20:51 Europe/Amsterdam, David Eppstein wrote: > Whenever I look through the archives of this list, or elsewhere on the > net, I see: a big mess of multiple versions of Python, in varying > states of development, OS-X friendliness and installability, with > multiple different UI systems. OS X.2 itself has a python > pre-installed (yay!), but unfortunately without UI components. My > specific situation is as a developer of a large genealogy program (in > C++, for Classic MacOS) that I would like to make native for OS X. > This requires a massive rewriting of code and it's beginning to look > like it might be easier to start over from scratch in a friendlier > programming language. > > In order to do this in Python, I would need: > - OS X native look and feel > - Easy download and installation by computer-challenged senior > citizens (e.g. standalone app with gzipped download size < 2Mb, no > installation of other packages or complicated command lines) > - Transparent input and display of accented characters > - Multiple windows mixing multi-font text and vector graphics, > with ability to capture mouse click location within window > > It would also be helpful, but not essential, to have cross-platform > portability, display or editing of basic HTML text formatting, ability > to convert contents of vector graphic windows to bitmap image files, > and ability to distribute the program as closed source. > > Is anything like this available now? If so, which version of Python > should I be looking at, and where are the easy installation > instructions? If not, will it be available any time soon, or should I > be looking around for non-Python alternative solutions? > -- > David Eppstein UC Irvine Dept. of Information & Computer Science > eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From eppstein@ics.uci.edu Tue Dec 3 22:06:31 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Tue, 03 Dec 2002 14:06:31 -0800 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? In-Reply-To: References: Message-ID: <81524518.1038924390@dhcp31-169.ics.uci.edu> On 12/3/02 10:41 PM +0100 Jack Jansen wrote: > If you are developing a turnkey application I think I would suggest > PyObjC. It can build on the installed /usr/bin/python, and an application > in PyObjC will fit all your requirements (possibly with the exception of > the 2MB download, I'm not 100% sure of that). Building a fullblown > application with PyObjC still has a few rough edges, but they're being > ironed out quickly. > > Cross-platform is out of the question with Cocoa, though. If that is > important to you you'll have to wait for either MacPython-OSX 2.2 or > MacPython-OSX 2.3, both scheduled to go to alfa in another month. (The > difference is that 2.2 will build on the Apple's pre-installed > /usr/bin/python). And then you'll have to add wxPython or Tkinter, both > of which are still a bit shaky (at least: they were the last time I > looked). And with these solutions I won't vouch for their handling of > accented characters and such. Thanks (also to Fran=E7ois Granger) for the feedback. I'd be willing to = wait=20 a month if the solution is likely to meet my needs better, but I'm a little = worried about the "add wxPython or Tkinter" part -- if my users have to add = that, it will significantly complicate the install process, but if I have=20 to add it myself, it will I assume bloat the download size. Will try looking into PyObjC. I don't mind a few rough edges on the=20 developer side as long as the users don't have to see them. -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From berkowit@silcom.com Tue Dec 3 22:07:42 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Tue, 03 Dec 2002 14:07:42 -0800 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? In-Reply-To: Message-ID: On 12/3/02 1:41 PM, "Jack Jansen" wrote: > Cross-platform is out of the question with Cocoa, though. If that is > important to you you'll have to wait for either MacPython-OSX 2.2 or > MacPython-OSX 2.3, both scheduled to go to alfa in another month. (The > difference is that 2.2 will build on the Apple's pre-installed > /usr/bin/python). Jack, Didn't you say on your website that MacPython-OSX 2.3 would be "uniting" the Apple pre-installed version with MacPython? (What does "uniting" mean?) Presumably that would be for a later version of OS X - OS 10.3 perhaps? Is there any chance that MacPython-OSX 2.2 would give Python scripters more versatility in writing Python without I exceeding what users with the standard 2.2 install have for running the resulting scripts? Or is that what might come with 2.3? -- Paul Berkowitz From billb@mousa.demon.co.uk Tue Dec 3 22:35:35 2002 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Tue, 3 Dec 2002 22:35:35 +0000 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? In-Reply-To: References: Message-ID: At 2:07 pm -0800 03/12/02, Paul Berkowitz wrote: >On 12/3/02 1:41 PM, "Jack Jansen" wrote: > >> Cross-platform is out of the question with Cocoa, though. If that is >> important to you you'll have to wait for either MacPython-OSX 2.2 or >> MacPython-OSX 2.3, both scheduled to go to alfa in another month. (The >> difference is that 2.2 will build on the Apple's pre-installed >> /usr/bin/python). > >Jack, > >Didn't you say on your website that MacPython-OSX 2.3 would be "uniting" the >Apple pre-installed version with MacPython? (What does "uniting" mean?) >Presumably that would be for a later version of OS X - OS 10.3 perhaps? > >Is there any chance that MacPython-OSX 2.2 would give Python scripters more >versatility in writing Python without I exceeding what users with the >standard 2.2 install have for running the resulting scripts? Or is that what >might come with 2.3? As far as I can see there very little extra in 2.3 that is not in 2.2.x. My advise to you would be to learn as much Python as you can and you will find that unless you want to interface with specific applications, or use apple only features such as finder aliases, you won't need to use the apple event modules. -- Bill Bedford He said no more is no less than it is if in the future we live in the past From billb@mousa.demon.co.uk Tue Dec 3 22:44:08 2002 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Tue, 3 Dec 2002 22:44:08 +0000 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: References: Message-ID: At 3:45 pm +0000 30/11/02, Michael J. Barber wrote: >The recent discussion of AppleScript and OSA inspired me to finally >write a package I've been thinking about for a while. I'm calling it >OSATools, and it basically is a set of wrappers for the 'osascript' and >'osacompile' OS X system calls. There are convenience functions for >several cases, and a basic but useful class modeling an AppleScript >interface. > >You can do things like: > >Python 2.2.1 (#1, 09/14/02, 00:14:43) >[GCC Apple devkit-based CPP 6.02] on darwin >Type "help", "copyright", "credits" or "license" for more information. > >>> from OSATools import AppModels > >>> finder = AppModels.AppleScriptApp("Finder") > >>> finder.tell('get the name of the startup disk') >'Macintosh HD\n' > >>> finder.tellBlock(['set countList to {}', >... 'set the end of countList to the count of the folder "Library" of >the startup disk', >... 'set the end of countList to the count of folder "Applications" >of the startup disk', >... 'return the countList']) >'36, 88\n' > >>> > >Written quickly and only tested a bit, so there are probably bugs. Seems >to work ok, though. > It seems to me that..... folderList = ['/Applications', '/Library'] countList = [] for f in dirFolder: countList.append(len(os.listdir(f))) return countList Is not only much more succinct, but is much easier to read. -- Bill Bedford He said no more is no less than it is if in the future we live in the past From Jack.Jansen@oratrix.com Tue Dec 3 23:24:23 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Wed, 4 Dec 2002 00:24:23 +0100 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? In-Reply-To: Message-ID: <5B76CEDC-0716-11D7-BF9B-000A27B19B96@oratrix.com> On dinsdag, dec 3, 2002, at 23:07 Europe/Amsterdam, Paul Berkowitz wrote: > On 12/3/02 1:41 PM, "Jack Jansen" wrote: > >> Cross-platform is out of the question with Cocoa, though. If that is >> important to you you'll have to wait for either MacPython-OSX 2.2 or >> MacPython-OSX 2.3, both scheduled to go to alfa in another month. (The >> difference is that 2.2 will build on the Apple's pre-installed >> /usr/bin/python). > > Jack, > > Didn't you say on your website that MacPython-OSX 2.3 would be > "uniting" the > Apple pre-installed version with MacPython? (What does "uniting" mean?) > Presumably that would be for a later version of OS X - OS 10.3 perhaps? My current naming scheme is that MacPython-OSX 2.2 is going to be based in Apple's /usr/bin/python, with the Mac 2.3 (note: two.THREE) stuff grafted on top of that. So, the binary installer for this should be reasonably small, and I hope this is the thing that will win over new Python converts. MacPython-OSX 2.3 is going to be a normal 2.3 install, including everything. Initially I think we should do source only, and if we do binary too we have to decide whether this is going to be framework based or not, and where to install it (over /usr/bin/python or not, etc). > Is there any chance that MacPython-OSX 2.2 would give Python scripters > more > versatility in writing Python without I exceeding what users with the > standard 2.2 install have for running the resulting scripts? Or is > that what > might come with 2.3? I'm not sure yet. There is an incredible amount of work, and as it is all of the integration type it is very difficult to share, which means I have to do it myself... -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Jack.Jansen@oratrix.com Tue Dec 3 23:28:58 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Wed, 4 Dec 2002 00:28:58 +0100 Subject: [Pythonmac-SIG] Warning for CVS users: another mass checkin coming Message-ID: A warning for people tracking CVS: there's another mass checkin coming for the Carbon modules. When this is in all Carbon types will be PEP253-compliant. This means that you can subtype the Carbon types from Python (and from C). This is all very exciting, but for the time being I won't guarantee that your code won't break. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Chris.Barker@noaa.gov Wed Dec 4 00:04:33 2002 From: Chris.Barker@noaa.gov (Chris Barker) Date: Tue, 03 Dec 2002 16:04:33 -0800 Subject: [Pythonmac-SIG] How long until OS X Python is ready for primetime? References: <81524518.1038924390@dhcp31-169.ics.uci.edu> Message-ID: <3DED4691.2C08B4F7@noaa.gov> David Eppstein wrote: > Thanks (also to François Granger) for the feedback. I'd be willing to wait > a month if the solution is likely to meet my needs better, Note that you don't have to wait a month to start coding. All of the mentioned solutions are available for use now, even if they are a bit hard to install and get working. I think it's reasonable to be confident that it will get all sorted out enough for your purposes within a few months. Besides, with all the time you will save by not using C++, you can help with the effort! > but I'm a little > worried about the "add wxPython or Tkinter" part -- if my users have to add > that, it will significantly complicate the install process, but if I have > to add it myself, it will I assume bloat the download size. Yes, it will, and I warn you that wxPython is pretty large. However, you need to think about how important it really is to have a small download. 5MB is just not the barrier that it once was for most folks. Also, once tkINter gets stable, it is likely to be included with the default Python, maybe even by Apple some day. TKinter is considered part of the standard library other platforms. Having said that, I'd choose wxPython or TkInter based on which one fits your needs better, rather than getting too focused on an extra couple of megabytes of stuff to install. The real question is whether you need Cross Platform capability. By definition, anything cross platform is going to require some libraries that do not come with the system. This is true for C and C++ as well. IN fact, most of wxPython is actually wxWindows, the C++ library, which you would need for a C++ app as well. > Will try looking into PyObjC. I don't mind a few rough edges on the > developer side as long as the users don't have to see them. That being the case, you can get started right away. If you do want cross platform, I'd give wxPython a ggod look. All you need to do is download the Mach-O python (and wxMacPython itself) from the wxPython web site: http://www.wxpython.org/download.php#binaries -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From dmlsj@yahoo.com Wed Dec 4 05:05:54 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Tue, 3 Dec 2002 21:05:54 -0800 Subject: [Pythonmac-SIG] On more framework to mention... Message-ID: <1123D5F6-0746-11D7-863C-003065D5C90C@yahoo.com> David, Depending upon the performance you require and the access to the system you require, Jython might be viable. Since Jython is Python it is a rapid-prototyping scripting language that is still adequate for some productions applications. And it has the advantage of Python in that it uses a standard GUI that is easily available for many platforms, Java AWT and Swing. It works well on OS X from what I have seen and performance is a lot better with Hot Spot (Java's built-in compiled module caching technology). Just another option you might consider. Daniel Lord -- daniellordATtelocityDOTcom GPG Fingerprint: C59E 59F5 1C63 5CFB 6161 067E FF00 A4E8 684A 16BB "The purpose of separation of church and state is to keep forever from these shores the ceaseless strife that has soaked the soil of Europe in blood for centuries." [James Madison, 1803] From mjb@uma.pt Wed Dec 4 09:15:21 2002 From: mjb@uma.pt (Michael J. Barber) Date: Wed, 4 Dec 2002 09:15:21 +0000 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: Message-ID: On Tuesday, December 3, 2002, at 10:44 PM, Bill Bedford wrote: [my example using AE snipped] > It seems to me that..... > > folderList = ['/Applications', '/Library'] > countList = [] > for f in dirFolder: > countList.append(len(os.listdir(f))) > return countList > > Is not only much more succinct, but is much easier to read. > That's very true. Not much of an example for how to construct an AppleScript-style tell block, though, is it? ;) Divorced from a real problem, it's a bit difficult to find a good example that is interesting, succinct, and (perhaps most importantly) uses an application that everyone has. Any suggestions? Michael From Jack.Jansen@cwi.nl Wed Dec 4 09:22:59 2002 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 4 Dec 2002 10:22:59 +0100 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: Message-ID: On Wednesday, Dec 4, 2002, at 10:15 Europe/Amsterdam, Michael J. Barber wrote: > That's very true. Not much of an example for how to construct an > AppleScript-style tell block, though, is it? ;) > > Divorced from a real problem, it's a bit difficult to find a good > example that is interesting, succinct, and (perhaps most importantly) > uses an application that everyone has. Any suggestions? How about an example that remembers (and re-creates) your finder window configuration? I.e. it goes over the open windows, remembers where they are on schreen and what they're displaying. An accompanying routine will take the data produced by this and opens and positions new windows, etc. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From berkowit@silcom.com Wed Dec 4 09:37:34 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Wed, 04 Dec 2002 01:37:34 -0800 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: Message-ID: On 12/4/02 1:15 AM, "Michael J. Barber" wrote: > On Tuesday, December 3, 2002, at 10:44 PM, Bill Bedford wrote: > > [my example using AE snipped] >> It seems to me that..... >> >> folderList = ['/Applications', '/Library'] >> countList = [] >> for f in dirFolder: >> countList.append(len(os.listdir(f))) >> return countList >> >> Is not only much more succinct, but is much easier to read. >> > That's very true. Not much of an example for how to construct an > AppleScript-style tell block, though, is it? ;) > > Divorced from a real problem, it's a bit difficult to find a good > example that is interesting, succinct, and (perhaps most importantly) > uses an application that everyone has. Any suggestions? AppleScript will always be more verbose than Python - that's part of its "English-like syntax". And Perl is more succinct than Python. That's how it is, and less comprehensible. Best to use an AS example in an application, which other languages can't touch. Everyone in OS 10.2 can do this: -------------- tell application "Address Book" set joeBlow to make new person with properties {first name:"Joe", last name:"Blow"} tell joeBlow to make new email at end of emails with properties {label:"home", value:"jblow@earthlink.com"} save addressbook end tell ---------------- Convert that into Python/OSA. -- Paul Berkowitz From mjb@uma.pt Wed Dec 4 10:37:05 2002 From: mjb@uma.pt (Michael J. Barber) Date: Wed, 4 Dec 2002 10:37:05 +0000 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: Message-ID: <550F025C-0774-11D7-93C6-0050E4794D0F@uma.pt> On Wednesday, December 4, 2002, at 09:37 AM, Paul Berkowitz wrote: >> Divorced from a real problem, it's a bit difficult to find a good >> example that is interesting, succinct, and (perhaps most importantly) >> uses an application that everyone has. Any suggestions? > > -------------- > > tell application "Address Book" > set joeBlow to make new person with properties {first name:"Joe", > last > name:"Blow"} > tell joeBlow to make new email at end of emails with properties > {label:"home", value:"jblow@earthlink.com"} > save addressbook > end tell > > > ---------------- > > Convert that into Python/OSA. > That's a great example! Only problem is we exclude those who are using 10.1; at the moment, I'm still in that group for various reasons. The script is a snap to write (thanks to Paul!), maybe someone could test it out for me? """Example of using OSATools to interface with Address Book. Requires Mac OS X 10.2+. Example suggested by Paul Berkowitz""" from OSATools import AppModels addbook = AppModels.AppleScriptApp("Address Book") addbook.tellBlock( ['set joeBlow to make new person with properties {first name:"Joe", last name:"Blow"}', 'tell joeBlow to make new email at end of emails with properties {label:"home", value:"jblow@earthlink.com"}', 'save addressbook']) From mjb@uma.pt Wed Dec 4 10:54:12 2002 From: mjb@uma.pt (Michael J. Barber) Date: Wed, 4 Dec 2002 10:54:12 +0000 Subject: [Pythonmac-SIG] Announce: OSATools Message-ID: <5B0FE38C-0777-11D7-93C6-0050E4794D0F@uma.pt> On Wednesday, December 4, 2002, at 09:22 AM, Jack Jansen wrote: > > On Wednesday, Dec 4, 2002, at 10:15 Europe/Amsterdam, Michael J. Barber > wrote: >> Divorced from a real problem, it's a bit difficult to find a good >> example that is interesting, succinct, and (perhaps most importantly) >> uses an application that everyone has. Any suggestions? > > How about an example that remembers (and re-creates) your finder window > configuration? I.e. it goes over the open windows, remembers where they > are on schreen and what they're displaying. An accompanying routine > will take the data produced by this and opens and positions new > windows, etc. > That seems quite doable. I'll put that together if I've got a free moment this evening. Keep 'em coming folks! From billb@mousa.demon.co.uk Wed Dec 4 11:59:51 2002 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Wed, 4 Dec 2002 11:59:51 +0000 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: References: Message-ID: At 1:37 am -0800 04/12/02, Paul Berkowitz wrote: >On 12/4/02 1:15 AM, "Michael J. Barber" wrote: > >> On Tuesday, December 3, 2002, at 10:44 PM, Bill Bedford wrote: >> >> [my example using AE snipped] >>> It seems to me that..... >>> >>> folderList = ['/Applications', '/Library'] >>> countList = [] >>> for f in dirFolder: >>> countList.append(len(os.listdir(f))) >>> return countList >>> >>> Is not only much more succinct, but is much easier to read. >>> >> That's very true. Not much of an example for how to construct an >> AppleScript-style tell block, though, is it? ;) >> >> Divorced from a real problem, it's a bit difficult to find a good >> example that is interesting, succinct, and (perhaps most importantly) >> uses an application that everyone has. Any suggestions? > > >AppleScript will always be more verbose than Python - that's part of its >"English-like syntax". And Perl is more succinct than Python. That's how it >is, and less comprehensible. Best to use an AS example in an application, >which other languages can't touch. Everyone in OS 10.2 can do this: > >-------------- > >tell application "Address Book" > set joeBlow to make new person with properties {first name:"Joe", last >name:"Blow"} > tell joeBlow to make new email at end of emails with properties >} > save addressbook >end tell > > >---------------- > >Convert that into Python/OSA. > Without having seen the Address Book dictionary it should be something like: import Address_Book ab = Address_Book.Address_Book ab.make(Address_Book.person('joeBlow'), Address_Book.properties({'first_name':"Joe", 'last_name':"Blow"})) ab.make(Address_Book.email(-1), Address_Book.person('joeBlow'), Address_Book.properties({{label:"home", value:"jblow@earthlink.com"})) ab.save_addressbook () Python interfaces not with apple script but with the underlying AppleEvents so there is no need for 'Tell Blocks" -- Bill Bedford He said no more is no less than it is if in the future we live in the past From billb@mousa.demon.co.uk Wed Dec 4 12:03:31 2002 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Wed, 4 Dec 2002 12:03:31 +0000 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: References: Message-ID: At 10:22 am +0100 04/12/02, Jack Jansen wrote: > >How about an example that remembers (and re-creates) your finder window >configuration? I.e. it goes over the open windows, remembers where they >are on schreen and what they're displaying. An accompanying routine >will take the data produced by this and opens and positions new >windows, etc. This is a bit difficult at the moment since the 'get' and 'set' events are not exposed. What wee could do with is an OSX version of 'Capture AE' to help build our own events. -- Bill Bedford He said no more is no less than it is if in the future we live in the past From bbum@codefab.com Wed Dec 4 15:42:35 2002 From: bbum@codefab.com (Bill Bumgarner) Date: Wed, 4 Dec 2002 10:42:35 -0500 Subject: [Pythonmac-SIG] Using PyObjC to build production apps In-Reply-To: <20021204091502.4732.28370.Mailman@mail.python.org> Message-ID: <0296C928-079F-11D7-8454-000393877AE4@codefab.com> On Wednesday, December 4, 2002, at 04:15 AM, pythonmac-sig-request@python.org wrote: > If you are developing a turnkey application I think I would suggest > PyObjC. It can build on the installed /usr/bin/python, and an > application in PyObjC will fit all your requirements (possibly with > the exception of the 2MB download, I'm not 100% sure of that). > Building a fullblown application with PyObjC still has a few rough > edges, but they're being ironed out quickly. As Jack mentioned, there are a couple of rough edges, but PyObjC is definitely a viable means of building standalone GUI applications targeted to MacOSX in Python. If you do decide to delve deeper into PyObjC, please grab the source/examples/etc from pyobjc.sourceforge.net. The current repository contents is way better than the last released version-- many bug fixes, many enhancements to make the programming experience considerably easier and more powerful. Ronald Oussoren has made the interaction between ObjC and Python significantly more seamless and bullet proof than the last release; he has gone so far as to identify and workaround some very subtle/nasty bugs in certain AppKit classes. The examples contained in the repository provide an excellent starting point. In particular, the Web Services Tool and TableModel2 provide complete examples of building PyObjC applications using Project Builder as the IDE. There are also examples that demonstrate building applications without using PB. Just van Rossum has done an incredible job of providing tools to the PyObjC project. In particular, Just contributed a mechanism via which classes defined in interface files [NIB files] are automatically created when the NIB file is loaded. That is, the entire step of keeping your source files in sync with your interface files has been eliminated-- "it just works". In this context, it is less work to build a PyObjC based Cocoa app than a Java or ObjC based Cocoa app! Personally, I'm using PyObjC to build two production quality applications, one of which is relatively complex [it is really a suite of applications that share two frameworks -- one framework of which is almost entirely implemented in Python with a PyObjC bridged layer that the rest of the app uses]. I chose this route not because I like living on the bleeding edge, but because using PyObjC cut a huge amount of gnarly, bug prone, code out of my project and the end result is a more robust applications that performs every bit as well as a pure-C/ObjC counterpart. (Specifically, I replaced the entire web services layer of my application with a python implementation of the web services client. As an added advantage, my python based web services client now works seamlessly across all operating systems / platforms, yet my OS X GUI client remains a pure Cocoa/OS X UI experience.) Very cool stuff -- we have come a long, long way since PyObjC '96! b.bum From larry.bugbee@boeing.com Wed Dec 4 19:21:14 2002 From: larry.bugbee@boeing.com (Bugbee, Larry) Date: Wed, 4 Dec 2002 11:21:14 -0800 Subject: [Pythonmac-SIG] How long until OS X Python is ready for primetime? Message-ID: <8CFC81BC2CC2A74F88BAB7180F00B7796F16AE@XCH-NW-29.nw.nos.boeing.com> All this is goodness, but I wonder if we are speaking to David's = original question. If I recall correctly, he has a large genealogy = program and the most likely user is a "computer-challenged senior = citizen". ...and that an *easy* download and installation is a must. I don't have any hard data, but most of the seniors I know are on a = limited/fixed incomes causing 56K to be a lot more common than ADSL or = cable. ..hence download size is a real factor. Most seniors that I = know, and there are exceptions, are lucky to have a machine, let alone a = fast one. ...and fast connections are equally rare. =20 Larry -----Original Message----- From: Chris Barker [mailto:Chris.Barker@noaa.gov] Sent: Tuesday, December 03, 2002 4:05 PM To: David Eppstein Cc: Jack Jansen; pythonmac-sig@python.org Subject: Re: [Pythonmac-SIG] How long until OS X Python is ready for primetime? David Eppstein wrote: > Thanks (also to Fran=E7ois Granger) for the feedback. I'd be willing = to wait > a month if the solution is likely to meet my needs better, Note that you don't have to wait a month to start coding. All of the mentioned solutions are available for use now, even if they are a bit hard to install and get working. I think it's reasonable to be confident that it will get all sorted out enough for your purposes within a few months. Besides, with all the time you will save by not using C++, you can help with the effort! > but I'm a little > worried about the "add wxPython or Tkinter" part -- if my users have = to add > that, it will significantly complicate the install process, but if I = have > to add it myself, it will I assume bloat the download size. Yes, it will, and I warn you that wxPython is pretty large. However, you need to think about how important it really is to have a small download. 5MB is just not the barrier that it once was for most folks. Also, once tkINter gets stable, it is likely to be included with the default Python, maybe even by Apple some day. TKinter is considered part of the standard library other platforms. Having said that, I'd choose wxPython or TkInter based on which one fits your needs better, rather than getting too focused on an extra couple of megabytes of stuff to install. The real question is whether you need Cross Platform capability. By definition, anything cross platform is going to require some libraries that do not come with the system. This is true for C and C++ as well. IN fact, most of wxPython is actually wxWindows, the C++ library, which you would need for a C++ app as well. > Will try looking into PyObjC. I don't mind a few rough edges on the > developer side as long as the users don't have to see them. That being the case, you can get started right away. If you do want cross platform, I'd give wxPython a ggod look. All you need to do is download the Mach-O python (and wxMacPython itself) from the wxPython web site: http://www.wxpython.org/download.php#binaries -Chris --=20 Christopher Barker, Ph.D. Oceanographer =09 NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig From dmlsj@yahoo.com Wed Dec 4 21:30:57 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Wed, 4 Dec 2002 13:30:57 -0800 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: Message-ID: All, Script Debugger, a commercial application, has an Os X working version=20= of somethign similar to AE Capture. See my script with listing of it's=20= results below. Granted it costs money though ;-) On Wednesday, Dec 4, 2002, at 04:03 US/Pacific, Bill Bedford wrote: > This is a bit difficult at the moment since the 'get' and 'set' events > are not exposed. What wee could do with is an OSX version of 'Capture > AE' to help build our own events. > (* Arrange Terminal.app windows For some weird reason the Finder orders the Windows from yougest = to=20 oldest whle the Terminal.app numbers them from oldest to youngest which=20= results in the arragement being backwards. Annoying but tolerable. So we = count down the list to circumvent the ordering method collision. =09 2002 Daniel Lord daniellordATtelocityDOTcom *) set h to 600 set w to 700 set x to 10 set y to 30 set xDelta to 20 set yDelta to 20 tell application "Terminal" set i to count of windows repeat while (i > 0) set size of window i to {w, h} set position of window i to {x, y} set x to xDelta + x set y to yDelta + y set i to i - 1 end repeat end tell (* Script =93ArrangeWindows=94 started ascr\tell{ ----:psn ($0000000000E60001$) }=00 core\cnte{ kocl:'cwin', ----:'null'(), &subj:'null'(), = &csig:65536 }=00 --> 5=00 core\setd{ data:[ 700, 600 ], ----:obj { form:'prop', = want:'prop',=20 seld:'psiz', from:obj { form:'indx', want:'cwin', seld:5, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 10, 30 ], ----:obj { form:'prop', want:'prop',=20= seld:'ppos', from:obj { form:'indx', want:'cwin', seld:5, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 700, 600 ], ----:obj { form:'prop', = want:'prop',=20 seld:'psiz', from:obj { form:'indx', want:'cwin', seld:4, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 30, 50 ], ----:obj { form:'prop', want:'prop',=20= seld:'ppos', from:obj { form:'indx', want:'cwin', seld:4, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 700, 600 ], ----:obj { form:'prop', = want:'prop',=20 seld:'psiz', from:obj { form:'indx', want:'cwin', seld:3, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 50, 70 ], ----:obj { form:'prop', want:'prop',=20= seld:'ppos', from:obj { form:'indx', want:'cwin', seld:3, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 700, 600 ], ----:obj { form:'prop', = want:'prop',=20 seld:'psiz', from:obj { form:'indx', want:'cwin', seld:2, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 70, 90 ], ----:obj { form:'prop', want:'prop',=20= seld:'ppos', from:obj { form:'indx', want:'cwin', seld:2, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 700, 600 ], ----:obj { form:'prop', = want:'prop',=20 seld:'psiz', from:obj { form:'indx', want:'cwin', seld:1, from:'null'()=20= } }, &csig:65536 }=00 core\setd{ data:[ 90, 110 ], ----:obj { form:'prop', = want:'prop',=20 seld:'ppos', from:obj { form:'indx', want:'cwin', seld:1, from:'null'()=20= } }, &csig:65536 }=00 ascr\tend{ }=00 Script =93ArrangeWindows=94 finished *) From billb@mousa.demon.co.uk Wed Dec 4 22:20:25 2002 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Wed, 4 Dec 2002 22:20:25 +0000 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: References: Message-ID: At 1:30 pm -0800 04/12/02, Daniel Lord wrote: >All, > >Script Debugger, a commercial application, has an Os X working version >of somethign similar to AE Capture. See my script with listing of it's >results below. Granted it costs money though ;-) > > > Presumably Script Debugger couldn't be used to debug python apple events. -- Bill Bedford He said no more is no less than it is if in the future we live in the past From dmlsj@yahoo.com Wed Dec 4 22:46:58 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Wed, 4 Dec 2002 14:46:58 -0800 Subject: [Pythonmac-SIG] Announce: OSATools In-Reply-To: Message-ID: <4BB3CFA8-07DA-11D7-9C57-003065D5C90C@yahoo.com> I don't think so, but it is useful for examining the AE sent to and from scriptable applications and apple scripts. If one can build a Python program to reproduce the same AE stream as the script, then that is most of the battle as far as understanding Python OSA is it not? Of course I am new to this stuff, but it seems to me that this capability, while not completely replacing AE Capture, provide a reasonable piece of it. According to Mark Aldritt, who wrote Script Debugger, a lot of AE recording was broken when Apple went to OS X and he has some bug reports in to Apple on it. Script Debugger cannot record the Finder nor iTunes for example. So an AE Capture-like applications may not be possible right now. Then again...this is conjecture on my part, some of you may know better. Daniel -- daniellordATtelocityDOTcom GPG Fingerprint: C59E 59F5 1C63 5CFB 6161 067E FF00 A4E8 684A 16BB "The purpose of separation of church and state is to keep forever from these shores the ceaseless strife that has soaked the soil of Europe in blood for centuries." [James Madison, 1803] On Wednesday, Dec 4, 2002, at 14:20 US/Pacific, Bill Bedford wrote: > At 1:30 pm -0800 04/12/02, Daniel Lord wrote: > >> All, >> >> Script Debugger, a commercial application, has an Os X working version >> of somethign similar to AE Capture. See my script with listing of >> it's >> results below. Granted it costs money though ;-) >> >> >> > > Presumably Script Debugger couldn't be used to debug python apple > events. > > > -- > > Bill Bedford > > He said no more is no less than it is > if in the future we live in the past > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > From eppstein@ics.uci.edu Thu Dec 5 02:57:13 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Wed, 04 Dec 2002 18:57:13 -0800 Subject: [Pythonmac-SIG] Re: How long until OS X Python is ready for primetime? Message-ID: <85627857.1039028233@[10.0.1.2]> Larry Bugbee wrote: > All this is goodness, but I wonder if we are speaking to David's > original question. If I recall correctly, he has a large genealogy > program and the most likely user is a "computer-challenged senior > citizen". ...and that an *easy* download and installation is a must. > > I don't have any hard data, but most of the seniors I know are on a > limited/fixed incomes causing 56K to be a lot more common than ADSL or > cable. ..hence download size is a real factor. Most seniors that I > know, and there are exceptions, are lucky to have a machine, let alone a > fast one. ...and fast connections are equally rare. Yep. Heck, I know of non-senior-cit computer science professors without fast home connections. Sometimes there are higher priority things to do with that $50/month... -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From mps@viewbuild.com Thu Dec 5 03:42:26 2002 From: mps@viewbuild.com (Matthew Smith) Date: Thu, 05 Dec 2002 14:42:26 +1100 Subject: [Pythonmac-SIG] Extending python Message-ID: Hello I need create a extension module, but am unsure as to how to go about doing it. Is using distutils the only way or is there an easier way? (os x specific maybe???) Also, can anyone point me in the direction of an example or two that can show me how it's done? Thanks, Matt Smith From dmlsj@yahoo.com Thu Dec 5 05:01:54 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Wed, 4 Dec 2002 21:01:54 -0800 Subject: [Pythonmac-SIG] Extending python In-Reply-To: Message-ID: Matthew, Go to the Python Language home page (www.python.org) and browse the documentation table of contents--there is a tutorial there to get you started. And, for the simple things I have tried, distutils works properly on OS X 10.2.2. On Wednesday, Dec 4, 2002, at 19:42 US/Pacific, Matthew Smith wrote: > Hello > > I need create a extension module, but am unsure as to how to go about > doing > it. Is using distutils the only way or is there an easier way? (os x > specific maybe???) > > Also, can anyone point me in the direction of an example or two that > can > show me how it's done? > > Thanks, > > Matt Smith > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From chip@adobe.com Thu Dec 5 20:05:39 2002 From: chip@adobe.com (Chip Brown) Date: Thu, 05 Dec 2002 12:05:39 -0800 Subject: [Pythonmac-SIG] Creating MacBinary files from python Message-ID: <5.1.0.14.2.20021205120252.02d73950@mailsea> --=====================_2059480187==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed I need a way to create Stuffit compatible zip files from within python. My experimentation indicates that a Stuffit created zip file is a collection of MacBinary files, zipped up. I should therefore be able to create a Stuffit compatible zip file from within python (which has built in zip support) as long as I can get the MacBinary versions of the included files. Does anyone out there knows of a python module (that actually works) which can create and disassemble MacBinary files, I would LOVE to know about it. There are such things for PERL and TCL, but I have not been able to find a python version... At worst, is there a darwin command line executable to do this?Thanks! --=====================_2059480187==_.ALT Content-Type: text/html; charset="us-ascii" I need a way to create Stuffit compatible zip files from within python. My experimentation indicates that a Stuffit created zip file is a collection of MacBinary files, zipped up.

I should therefore be able to create a Stuffit compatible zip file from within python (which has built in zip support) as long as I can get the MacBinary versions of the included files.

Does anyone out there knows of a python module (that actually works) which can create and disassemble MacBinary files, I would LOVE to know about it. There are such things for PERL and TCL, but I have not been able to find a python version...

At worst, is there a darwin command line executable to do this?Thanks! --=====================_2059480187==_.ALT-- From Jack.Jansen@oratrix.com Thu Dec 5 22:50:51 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 5 Dec 2002 23:50:51 +0100 Subject: [Pythonmac-SIG] Creating MacBinary files from python In-Reply-To: <5.1.0.14.2.20021205120252.02d73950@mailsea> Message-ID: <01456402-08A4-11D7-90D4-000A27B19B96@oratrix.com> On donderdag, dec 5, 2002, at 21:05 Europe/Amsterdam, Chip Brown wrote: > I need a way to create Stuffit compatible zip files from within > python. My experimentation indicates that a Stuffit created zip file > is a collection of MacBinary files, zipped up. > > I should therefore be able to create a Stuffit compatible zip file > from within python (which has built in zip support) as long as I can > get the MacBinary versions of the included files. > > Does anyone out there knows of a python module (that actually works) > which can create and disassemble MacBinary files, I would LOVE to know > about it. There are such things for PERL and TCL, but I have not been > able to find a python version... I started on a macbinary module years ago, but it never got finished. I remember that I got stuck because there were somethings in the MacBinary format that made it non-trivial. (The format is well-documented, a google search should turn it up). If you do write something up yourself: please contribute it. It would be a handy module to have, -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From mps@viewbuild.com Thu Dec 5 23:12:11 2002 From: mps@viewbuild.com (Matthew Smith) Date: Fri, 06 Dec 2002 10:12:11 +1100 Subject: [Pythonmac-SIG] Extending python In-Reply-To: <3DEF8508.DE246172@noaa.gov> Message-ID: Thanks for the help guys, >> I need create a extension module, but am unsure as to how to go about doing >> it. Is using distutils the only way or is there an easier way? (os x >> specific maybe???) > > This depends somewhat on which version of Python you are trying to > extend. If you are extending the "unix-y" python that came with Jaguar, > or probably any of the mach-o versions, distutils is the easiest way to > go. For a simple extension, most of it is all set up for you. see: > > http://www.python.org/doc/current/ext/building.html > > On MacPython on OS-9 or Carbon on OS-X, you probably want to use > CodeWarrior, and I'm not sure how easy it is to use distutils with that. > It's not all that hard to set up a project file, however. Post a note > here with your version of CodeWarrior, and someone can probably send you > a sample. I'm working with the framework build on 10.2.2 - so distutils it is!! > Go to the Python Language home page (www.python.org) and browse the > documentation table of contents--there is a tutorial there to get you > started. And, for the simple things I have tried, distutils works > properly on OS X 10.2.2. > -Chris Thanks, Cheers Matt From dmlsj@yahoo.com Fri Dec 6 00:36:17 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Thu, 5 Dec 2002 16:36:17 -0800 Subject: [Pythonmac-SIG] Extending python In-Reply-To: Message-ID: Matt, Just to be clear: when I pointed you to the tutorial on the Python web site and said simple extensions in C worked with 10.2.2 for me, I should mention I am using Python 2.3a from CVS in a framework install on 10.2.2. I have not tried either of the two IDEs,Code Warrior or Project Builder--why bother?, nor have I succeeded, though I tried, in building with gcc from the command line and a make file. libtool generates errors about undefined objects during link no matter what flags I tried--I obviously don't know the magic command string. If I ever find the time, I'll try and disect distutils on OS X to find out the secret. -Daniel From niel_mayhew@mac.com Fri Dec 6 05:28:09 2002 From: niel_mayhew@mac.com (Neil Mayhew) Date: Thu, 05 Dec 2002 22:28:09 -0700 Subject: [Pythonmac-SIG] Creating MacBinary files from python In-Reply-To: <5.1.0.14.2.20021205120252.02d73950@mailsea> Message-ID: on 05/12/2002 1:05 PM, Chip Brown at chip@adobe.com wrote: > My experimentation indicates that a Stuffit created zip file is a collection > of MacBinary files, zipped up. I think StuffIt uses a different compression algorithm from Zip. > At worst, is there a darwin command line executable to do this? I heard that recent versions of StuffIt Deluxe include a command-line tool. I think there are also some wrapper classes in PowerPlant that allow you to interact with the StuffIt Engine shared library. These, or the StuffIt SDK itself, should enable you to produce a Python extension that interfaces to the library. This should allow you to read and write archives at will, at full native speed. I'm not sure how it (Aladdin Expander) works on Windows, and whether it has a separate dll. If you don't need compatibility with StuffIt, hfspax is a useful tool: --Neil From just@letterror.com Fri Dec 6 09:13:56 2002 From: just@letterror.com (Just van Rossum) Date: Fri, 6 Dec 2002 10:13:56 +0100 Subject: [Pythonmac-SIG] Creating MacBinary files from python In-Reply-To: Message-ID: Neil Mayhew wrote: > on 05/12/2002 1:05 PM, Chip Brown at chip@adobe.com wrote: > > > My experimentation indicates that a Stuffit created zip file is a collection > > of MacBinary files, zipped up. > > I think StuffIt uses a different compression algorithm from Zip. For .sit files, yes, but it can create regular .zip files, too (see eg. the DropZip droplet). Just From ryanwilcox@mac.com Fri Dec 6 14:04:24 2002 From: ryanwilcox@mac.com (Ryan Wilcox) Date: Fri, 6 Dec 2002 09:04:24 -0500 Subject: [Pythonmac-SIG] Creating MacBinary files from python In-Reply-To: <5.1.0.14.2.20021205120252.02d73950@mailsea> Message-ID: On Thursday, December 5, 2002, at 12:05 PM, Chip Brown wrote: >I need a way to create Stuffit compatible zip files from within >python. My experimentation indicates that a Stuffit created zip file >is a collection of MacBinary files, zipped up. A few weeks ago, on Apple's CarbonDev mailing list, Richard Buckle posted a link to his MacBinary(III) command-line tool. Perhaps you could write a python wrapper for it, or maybe even pick up where Jack left off. ;) Link: http://www.sailmaker.co.uk/newfiles/macbinary.sit Hope this helps somewhat, -Ryan Wilcox From Chris.Barker@noaa.gov Fri Dec 6 17:13:07 2002 From: Chris.Barker@noaa.gov (Chris Barker) Date: Fri, 06 Dec 2002 09:13:07 -0800 Subject: [Pythonmac-SIG] Re: How long until OS X Python is ready for primetime? References: <85627857.1039028233@[10.0.1.2]> Message-ID: <3DF0DAA3.E363C1FE@noaa.gov> David Eppstein wrote: > Yep. Heck, I know of non-senior-cit computer science professors without > fast home connections. Sometimes there are higher priority things to do > with that $50/month... Quite true. As a developer, one has to decide how much to prioritize a small distributable vs. easy of development. for the original poster, the question of whether he wants to support other platforms is a critical one. For just OS-X, pyObjC and Cocoa is probably the best bet. For cross platform development, he's going to need another tool. By the way, PyQT may be worth taking a look at. I don't know if they have an OS-X port yet, but it certainly should be doable if it hasn't yet been done. As for wxPython, the wxWindows libaries are pretty darn big (the main library on Linux is about 4MB). However, there is a whole lot of stuff in that library, much of which a particular app is probably not using. There has been talk of splitting it into separate libraries, just for this reason. If I was using wxPython (which I am) and was concerned about distribution size (which I'm not) I'd look into helping with that effort. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From lee@lee-phillips.org Sat Dec 7 19:05:01 2002 From: lee@lee-phillips.org (Lee Phillips) Date: Sat, 7 Dec 2002 14:05:01 -0500 Subject: [Pythonmac-SIG] ZODB with Jaguar Message-ID: <20021207140501.B1282@metamere> I want to use the standalone ZODB (Zope Object DataBase) with Jaguar (MacOS X 10.2, included python 2.2). It compiles with numerous warnings and the test.py crashes with a bus error. I've heard that it might work with some older pythons, but I'd rather not downgrade. Has anyone here gotten the ZODB to work with MacOS 10.2.x? Any other suggestions for good object storage, besides just using pickle? From jwblist@olympus.net Sun Dec 8 05:44:25 2002 From: jwblist@olympus.net (John W Baxter) Date: Sat, 7 Dec 2002 21:44:25 -0800 Subject: [Pythonmac-SIG] How long until OS X Python is ready for prime time? In-Reply-To: <81037743.1038916278@dhcp31-169.ics.uci.edu> References: <81037743.1038916278@dhcp31-169.ics.uci.edu> Message-ID: At 11:51 -0800 12/3/2002, David Eppstein wrote: >My specific situation is as a >developer of a large genealogy program (in C++, for Classic MacOS) that I >would like to make native for OS X. This requires a massive rewriting of >code and it's beginning to look like it might be easier to start over from >scratch in a friendlier programming language. > >In order to do this in Python, I would need: >- OS X native look and feel >- Easy download and installation by computer-challenged senior citizens >(e.g. standalone app with gzipped download size < 2Mb, no installation of >other packages or complicated command lines) >- Transparent input and display of accented characters >- Multiple windows mixing multi-font text and vector graphics, >with ability to capture mouse click location within window The village heretic says: Given the current state of things Python, and that fact that you're starting from not-Python, you *might* want to give a thought to RealBASIC. (After doing so, you might well return to Python for the project, of course.) More $$$ (I've forgotten what they do for academic folk). Cross platform as long as you mean Mac and Windows (which your audience suggests you do). Simple install, but large download. Does GUI well on both platforms. Last I knew, still did that old "dead" Mac OS 9 in addition to Mac OS X--and 9 is what the Mac part of your audience likely has. http://www.realbasic.com/ While one can now develop on Windows, that side is young...you probably still want to develop on Mac and deploy to Mac and Windows. Anyone know? I haven't been keeping up with RealBASIC...I'm not at all sure I'll "deserve" an upgrade price when I finally have time to play again. But I'll accept one. ;-) --John (who grew up in Pasadena when Irvin was rather less than it is now) -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jwblist@olympus.net Sun Dec 8 06:14:00 2002 From: jwblist@olympus.net (John W Baxter) Date: Sat, 7 Dec 2002 22:14:00 -0800 Subject: [Pythonmac-SIG] Running Python scripts without full paths In-Reply-To: References: Message-ID: At 10:34 -0800 11/30/2002, Paul Berkowitz wrote: >I must say; it seems odd for something >called "usr" to be computer-wide (local), but that's where it is. I know the above is *old* (a week is, what, 15 computer years? ;-), but I didn't see a comment on it in the thread except for the home directory once in /usr/... one. Possible, but that "once" was long ago (I saw no trace of it in 1992 when I started "Unixing"). usr, at least now, can be thought of as "Unix system resources" and the only thing it has to do with users is that it is really easy to type /user instead of /usr. It must be easy to create that typo, I do it several times a week. ;-( --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jwblist@olympus.net Sun Dec 8 06:27:51 2002 From: jwblist@olympus.net (John W Baxter) Date: Sat, 7 Dec 2002 22:27:51 -0800 Subject: [Pythonmac-SIG] Warning: incompatible change in 2.3a0 In-Reply-To: References: Message-ID: At 0:11 +0100 11/29/2002, Jack Jansen wrote: >To give an >example, in stead of "port.bounds" you'll have to use >"port.GetPortBounds()", and in stead of "Carbon.Qd.qd.arrow" you'll >have to use "Carbon.Qd.GetQDGlobalsArrow()". If only Apple had figured this out prior to January, 1984. Sigh! Let's see...one structure for a color window (when they appeared) instead of all the pieces there were, etc etc etc. And then there was squeezing odd bytes into the "unused" high byte of 24-bit addresses...this was Apple's equivalent of W.G.'s "no one will ever need more than 640K of RAM." To be fair, the result might well not have fit into the ROM and RAM space available in the machines released as Original Macs (one of which is about 25 feet behind me and a little to the right, gathering dust). But Macintosh II was the last point in time when things should have been fixed (and the MMU should have been standard then, and used...as it was, IIci was the first machine with MMU used full time whether VM was on or not). Oh, well. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From eppstein@ics.uci.edu Sun Dec 8 08:24:37 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Sun, 08 Dec 2002 00:24:37 -0800 Subject: [Pythonmac-SIG] Re: How long until OS X Python is ready for prime time? References: <81037743.1038916278@dhcp31-169.ics.uci.edu> Message-ID: In article , John W Baxter wrote: > The village heretic says: > > Given the current state of things Python, and that fact that you're > starting from not-Python, you *might* want to give a thought to RealBASIC. > (After doing so, you might well return to Python for the project, of > course.) > > More $$$ (I've forgotten what they do for academic folk). > Cross platform as long as you mean Mac and Windows (which your audience > suggests you do). > Simple install, but large download. > Does GUI well on both platforms. Last I knew, still did that old "dead" > Mac OS 9 in addition to Mac OS X--and 9 is what the Mac part of your > audience likely has. > http://www.realbasic.com/ Thanks for the suggestion, but to me the choices are either to hack the current C++ project, or to rewrite in a language that would be significantly simpler for expressing complex algorithms, namely Python. My naive impression of current Basics (having not programmed in the language for probably 25 years) is they are great for whipping up quick UIs and miserable for anything else complex. Anyway, the OS 9'ers already have a working version of my app, it's the OS X'ers that are nagging me for an update. So far I've started playing with pyobjc and (except for lack of cross platform ability) I like what I see. But I want to try using it on a couple medium size apps before tackling the bigger one. -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From jwight_lists@spamcop.net Mon Dec 9 01:54:49 2002 From: jwight_lists@spamcop.net (Jonathan Wight) Date: Sun, 08 Dec 2002 19:54:49 -0600 Subject: [Pythonmac-SIG] Install MySQLdb module on mac os x In-Reply-To: Message-ID: I just ran across this one myself. (Trying to get pyexpat running on a default 10.2.3). Has anyone filed a bug with radar for the i386 target in the Makefile problem? (While I'm at it I'd like to to get pyexpat and readline into the official Darwin python build.) Jon. On 11/18/2002 07:52, "Jack Jansen" wrote: > > On maandag, nov 18, 2002, at 13:14 Europe/Amsterdam, Dieter Gyselinck > wrote: > >> Hi, >> >> I'm trying to install the python MySQLdb module on os x 10.2 but >> when I try to run 'setup.py build' I get this error message : >> ld: can't locate file for: -lmysqlclient >> gcc -arch i386 -arch ppc -bundle -flat_namespace -undefined suppress >> build/temp.darwin-6.0-Power Macintosh-2.2/_mysql.o -L/usr/lib/mysql >> -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/sw/lib >> -lmysqlclient -lz -o build/lib.darwin-6.0-Power >> Macintosh-2.2/_mysql.so -flat_namespace >> ld: for architecture i386 > > This probably isn't the problem, but you should fix it anyway: Apple > distributes a /usr/lib/python2.2/config/Makefile that isn't 100% > correct. Edit it (with sudo) and remove the "-arch i386". > >> ld: warning -L: directory name (/usr/lib/mysql) does not exist >> ld: warning -L: directory name (/sw/lib) does not exist > > This is the problem, I think: the build procedure doesn't know where > your mysql library is located. You can probably edit the setup.py file > to tell it where it is. > -- > - Jack Jansen > http://www.cwi.nl/~jack - > - If I can't dance I don't want to be part of your revolution -- Emma > Goldman - > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From Jack.Jansen@cwi.nl Mon Dec 9 12:27:59 2002 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 9 Dec 2002 13:27:59 +0100 Subject: [Pythonmac-SIG] Install MySQLdb module on mac os x In-Reply-To: Message-ID: On Monday, Dec 9, 2002, at 02:54 Europe/Amsterdam, Jonathan Wight wrote: > I just ran across this one myself. (Trying to get pyexpat running on a > default 10.2.3). > > Has anyone filed a bug with radar for the i386 target in the Makefile > problem? Yes, I filed it, and I got the reply that this was already an open issue. I don't remember the bug ID, though, and I can't seem to find it:-( > > (While I'm at it I'd like to to get pyexpat and readline into the > official > Darwin python build.) Readline is probably going to be a problem, because of the GPL, but you can always try. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From jwight_lists@spamcop.net Mon Dec 9 13:58:15 2002 From: jwight_lists@spamcop.net (Jonathan Wight) Date: Mon, 09 Dec 2002 07:58:15 -0600 Subject: [Pythonmac-SIG] Install MySQLdb module on mac os x In-Reply-To: Message-ID: On 12/09/2002 06:27, "Jack Jansen" wrote: > On Monday, Dec 9, 2002, at 02:54 Europe/Amsterdam, Jonathan Wight wrote: > >> I just ran across this one myself. (Trying to get pyexpat running on a >> default 10.2.3). >> >> Has anyone filed a bug with radar for the i386 target in the Makefile >> problem? > > Yes, I filed it, and I got the reply that this was already an open > issue. > I don't remember the bug ID, though, and I can't seem to find it:-( That's good news - if you ever do find the bug # please forward it on - I'd be interested in tracking it. Hopefully it'll be fixed before 10.2.3 leaves dev - but I doubt it will be. >> (While I'm at it I'd like to to get pyexpat and readline into the >> official >> Darwin python build.) > > Readline is probably going to be a problem, because of the GPL, but you > can always > try. Hope springs eternal. Cheers. Jon. From mps@viewbuild.com Tue Dec 10 02:26:06 2002 From: mps@viewbuild.com (Matthew Smith) Date: Tue, 10 Dec 2002 13:26:06 +1100 Subject: [Pythonmac-SIG] Extending python in C++ In-Reply-To: Message-ID: Hello Sorry that this is not mac related, I'm trying to extend python with some C++ source, only I am having difficulty exporting my init function. More specifically, when I try to import my module (demo.so), I get the following error: Loaded module does not contain symbol _initdemo My source does contain the following function: void initdemo() { Py_InitModule("demo", demoMethods); } I'm assuming that this function either somehow needs to be exported, or is being optimised out. Any suggestions? Matt Smith From dmlsj@yahoo.com Tue Dec 10 03:25:09 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Mon, 9 Dec 2002 19:25:09 -0800 Subject: [Pythonmac-SIG] Extending python in C++ In-Reply-To: Message-ID: Matt, Go to the Python Language site and click on the Documentation Link, there is a tutorial there about extending Python in C. URL: http://www.python.org/doc/current/ext/ext.html Remember, C++ needs to be wrapped in the extern macro for APIs expecting C code. I believe that if you do that while following the tutorial, you'll have your problem solved. Daniel -- daniellordATtelocityDOTcom GPG Fingerprint: C59E 59F5 1C63 5CFB 6161 067E FF00 A4E8 684A 16BB perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR\!AUBGNSTY];print;' On Monday, Dec 9, 2002, at 18:26 US/Pacific, Matthew Smith wrote: > Hello > > Sorry that this is not mac related, > > I'm trying to extend python with some C++ source, only I am having > difficulty exporting my init function. More specifically, when I try to > import my module (demo.so), I get the following error: > Loaded module does not contain symbol _initdemo > > My source does contain the following function: > > void initdemo() > { > Py_InitModule("demo", demoMethods); > } > > I'm assuming that this function either somehow needs to be exported, > or is > being optimised out. > > Any suggestions? > > Matt Smith > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > From Jack.Jansen@cwi.nl Tue Dec 10 10:08:17 2002 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 10 Dec 2002 11:08:17 +0100 Subject: [Pythonmac-SIG] Extending python in C++ In-Reply-To: Message-ID: <4D81F37F-0C27-11D7-AE16-0030655234CE@cwi.nl> On Tuesday, Dec 10, 2002, at 03:26 Europe/Amsterdam, Matthew Smith wrote: > I'm trying to extend python with some C++ source, [...] > > void initdemo() > { > Py_InitModule("demo", demoMethods); > } You need an extern "C" construct for that one, otherwise the symbol name will be name-mangled according to the C++ rules. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Chris.Barker@noaa.gov Tue Dec 10 16:19:16 2002 From: Chris.Barker@noaa.gov (Chris Barker) Date: Tue, 10 Dec 2002 08:19:16 -0800 Subject: [Pythonmac-SIG] Extending python in C++ References: <4D81F37F-0C27-11D7-AE16-0030655234CE@cwi.nl> Message-ID: <3DF61404.1FA239DB@noaa.gov> > > I'm trying to extend python with some C++ source, [...] > > > > void initdemo() > > { > > Py_InitModule("demo", demoMethods); > > } > > You need an extern "C" construct for that one, otherwise the symbol > name will be name-mangled according to the C++ rules. To be precise, you need: extern "C" void initdemo() { Py_InitModule("demo", demoMethods); } I don't what version of Python or what compiler you're using, but I also had a problem linking a C++ extension to the Python that came with Jaguar. this was Jack's response to my problem: > This just came by on another mailing list. The problem is that > the link step is done with "gcc", not "g++", so you have to add > the C++ library by hand. The easiest is to add an > extra_link_libraries (iirc) flag to the setup.py file. Honestly, I havn't tried it. I was only using C++ for a few handy syntax improvements over C, so I just re-wrote my extension in C (I had done this before Jack posted that tip) -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From njriley@uiuc.edu Tue Dec 10 18:26:22 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Tue, 10 Dec 2002 12:26:22 -0600 Subject: [Pythonmac-SIG] Problem with module linking Message-ID: <20021210182622.GB3308410@uiuc.edu> Hi, I'm trying to get the Python bindings for Subversion (subversion.tigris.org) to work with Python 2.2.2 on OS X. I've successfully built the bindings with SWIG 1.3.17, but I have a problem importing the modules. % ls *.so _client.so* _delta.so* _fs.so* _ra.so* _repos.so* _util.so* _wc.so* % file _fs.so _ra.so _fs.so: Mach-O bundle ppc _ra.so: Mach-O bundle ppc % otool -L _fs.so _ra.so _fs.so: Python.framework/Versions/2.2/Python (compatibility version 2.2.0, current version 2.2.0) /usr/local/encap/subversion/lib/libsvn_fs-1.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 62.0.0) _ra.so: Python.framework/Versions/2.2/Python (compatibility version 2.2.0, current version 2.2.0) /usr/local/encap/subversion/lib/libsvn_ra-1.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 62.0.0) % python Python 2.2.2 (#14, Nov 30 2002, 15:47:39) [GCC 3.1 20020420 (prerelease)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _fs >>> import _ra Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module >>> % python Python 2.2.2 (#14, Nov 30 2002, 15:47:39) [GCC 3.1 20020420 (prerelease)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _ra >>> import _fs Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module >>> As you can see, I can import one module OK, but the second one fails. My guess is it's something related to the linker, but I don't know anything about how Python loads modules. This works fine on other platforms for other people. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From Chris.Barker@noaa.gov Tue Dec 10 18:37:07 2002 From: Chris.Barker@noaa.gov (Chris Barker) Date: Tue, 10 Dec 2002 10:37:07 -0800 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <20021210182622.GB3308410@uiuc.edu> Message-ID: <63080FBE-0C6E-11D7-A65E-000393A96660@noaa.gov> On Tuesday, December 10, 2002, at 10:26 AM, Nicholas Riley wrote: > Traceback (most recent call last): > File "", line 1, in ? > ImportError: Failure linking new module > > As you can see, I can import one module OK, but the second one fails. > My guess is it's something related to the linker, but I don't know > anything about how Python loads modules. This works fine on other > platforms for other people. Is any of this in C++? if so, see the message I just posted. -Chris Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From njriley@uiuc.edu Tue Dec 10 18:43:17 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Tue, 10 Dec 2002 12:43:17 -0600 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <63080FBE-0C6E-11D7-A65E-000393A96660@noaa.gov> References: <20021210182622.GB3308410@uiuc.edu> <63080FBE-0C6E-11D7-A65E-000393A96660@noaa.gov> Message-ID: <20021210184317.GA3277751@uiuc.edu> On Tue, Dec 10, 2002 at 10:37:07AM -0800, Chris Barker wrote: > > On Tuesday, December 10, 2002, at 10:26 AM, Nicholas Riley wrote: > >Traceback (most recent call last): > > File "", line 1, in ? > >ImportError: Failure linking new module > > > >As you can see, I can import one module OK, but the second one fails. > >My guess is it's something related to the linker, but I don't know > >anything about how Python loads modules. This works fine on other > >platforms for other people. > > Is any of this in C++? if so, see the message I just posted. I guess I should mention that the first module to be imported works fine: >>> import _ra >>> dir(_ra) ['SVN_RA_ABI_VERSION', '__doc__', '__file__', '__name__', 'delete_svn_ra_callbacks_t', 'delete_svn_ra_plugin_t', 'delete_svn_ra_reporter_t', 'delete_svn_ra_simple_password_authenticator_t', 'delete_svn_ra_username_authenticator_t', 'new_svn... There's no C++ code in there, but I have no idea what SWIG might have done. Thanks, -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From njriley@uiuc.edu Tue Dec 10 18:39:08 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Tue, 10 Dec 2002 12:39:08 -0600 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <20021210182622.GB3308410@uiuc.edu> References: <20021210182622.GB3308410@uiuc.edu> Message-ID: <20021210183908.GC3308410@uiuc.edu> A bit more information: here's the ktrace output. 8439 python CALL open(0xbfffe2c0,0,0x1b6) 8439 python NAMI "_fs.so" 8439 python RET open 3 8439 python CALL open(0xbfffd950,0,0xc) 8439 python NAMI "." 8439 python RET open 4 8439 python CALL fstat(0x4,0xbfffd770) 8439 python RET fstat 0 8439 python CALL fcntl(0x4,0x2,0x1) 8439 python RET fcntl 0 8439 python CALL fstatfs(0x4,0xbfffd7d0) 8439 python RET fstatfs 0 8439 python CALL getdirentries(0x4,0x1c2b20,0x1000,0x6cfa4) 8439 python RET getdirentries 448/0x1c0 8439 python CALL lseek(0x4,0,0,0) 8439 python RET lseek 0 8439 python CALL close(0x4) 8439 python RET close 0 8439 python CALL open(0xbfffe2c0,0,0) 8439 python NAMI "_fs.so" 8439 python RET open 4 8439 python CALL fstat(0x4,0xbfffdef0) 8439 python RET fstat 0 8439 python CALL close(0x4) 8439 python RET close 0 8439 python CALL open(0x92f340,0,0) 8439 python NAMI "Python.framework/Versions/2.2/Python" 8439 python RET open -1 errno 2 No such file or directory 8439 python CALL stat(0x7320,0xbfffdc40) 8439 python NAMI "/Users/nicholas/Library/Frameworks/Python.framework/Versions/2.2/Python" 8439 python RET stat -1 errno 2 No such file or directory 8439 python CALL stat(0x7320,0xbfffdc40) 8439 python NAMI "/Library/Frameworks/Python.framework/Versions/2.2/Python" 8439 python RET stat 0 8439 python CALL open(0x7320,0,0) 8439 python NAMI "/Library/Frameworks/Python.framework/Versions/2.2/Python" 8439 python RET open 4 8439 python CALL fstat(0x4,0xbfffdd90) 8439 python RET fstat 0 8439 python CALL close(0x4) 8439 python RET close 0 8439 python CALL close(0x3) 8439 python RET close 0 8439 python CALL write(0x2,0x458834,0x23) 8439 python GIO fd 2 wrote 35 bytes "Traceback (most recent call last): " I don't see anything in there that looks like the library opening failed, in fact Python (or dyld?) is closing the file descriptors after it opened them. Is there anything else I can check? -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From mps@viewbuild.com Wed Dec 11 02:11:54 2002 From: mps@viewbuild.com (Matthew Smith) Date: Wed, 11 Dec 2002 13:11:54 +1100 Subject: [Pythonmac-SIG] Extending python in C++ In-Reply-To: <3DF61404.1FA239DB@noaa.gov> Message-ID: >>> I'm trying to extend python with some C++ source, [...] >>> >>> void initdemo() >>> { >>> Py_InitModule("demo", demoMethods); >>> } >> >> You need an extern "C" construct for that one, otherwise the symbol >> name will be name-mangled according to the C++ rules. > > To be precise, you need: > > extern "C" void initdemo() > { > Py_InitModule("demo", demoMethods); > } Thanks. > I don't what version of Python or what compiler you're using, but I also > had a problem linking a C++ extension to the Python that came with > Jaguar. this was Jack's response to my problem: > >> This just came by on another mailing list. The problem is that >> the link step is done with "gcc", not "g++", so you have to add >> the C++ library by hand. The easiest is to add an >> extra_link_libraries (iirc) flag to the setup.py file. > > Honestly, I havn't tried it. I was only using C++ for a few handy syntax > improvements over C, so I just re-wrote my extension in C (I had done > this before Jack posted that tip) What exactly do you mean? I've managed to get the cpp extension file to compile and work with python, but I am now having issues getting distutils to recognise a library I am using... It's called libcryptopp.a and I have it in the distribution directory, with it's header files in crypto42 directory. Try as I might, I can't get distutils to find the library. Any Ideas? I suppose my best bet is to subscribe to the distutils SIG. Cheers Matt From mps@viewbuild.com Wed Dec 11 03:06:14 2002 From: mps@viewbuild.com (Matthew Smith) Date: Wed, 11 Dec 2002 14:06:14 +1100 Subject: [Pythonmac-SIG] Extending python in C++ In-Reply-To: Message-ID: > It's called libcryptopp.a and I have it in the distribution directory, with > it's header files in crypto42 directory. > > Try as I might, I can't get distutils to find the library. I'm talking to myself :) Found out why the lib would not be found: I needed to reference to it as cryptopp , not libcryptopp.a. Now I just need to find out why I get the following when in python: Python 2.2 (#1, 07/14/02, 23:25:09) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import vbsecurity Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module Cheers Matt From Jack.Jansen@cwi.nl Wed Dec 11 15:47:19 2002 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 11 Dec 2002 16:47:19 +0100 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <20021210182622.GB3308410@uiuc.edu> Message-ID: On Tuesday, Dec 10, 2002, at 19:26 Europe/Amsterdam, Nicholas Riley wrote: > % python > Python 2.2.2 (#14, Nov 30 2002, 15:47:39) > [GCC 3.1 20020420 (prerelease)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import _fs >>>> import _ra > Traceback (most recent call last): > File "", line 1, in ? > ImportError: Failure linking new module First check that the python you're using is indeed a framework-python and not a static python (then you would pull in a second copy of the interpreter from Python.framework, and all sorts of nasty things could happen). Second try setting the DYLD_PRINT_LIBRARIES environment variable, which will cause the dynamic loader to tell you what it is doing. You might also try to set DYLD_TRACE, but I never used it. See "man dyld" for details. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From melbohince@attbi.com Wed Dec 11 20:02:56 2002 From: melbohince@attbi.com (Mel Bohince) Date: Wed, 11 Dec 2002 15:02:56 -0500 Subject: [Pythonmac-SIG] Framework Python? Message-ID: Can someone offer an explanation or link to what is meant by a framework versus whatever is the opposite? I keep seeing it tossed around here and there and from the context relate it only to OS X. Is it something different than MacPython or the unix Python in the /usr/bin? Thanks. -: -: -: -: -: -: -: -: \|/ -: -: -: -: -: -: -: -: cU Mel Bohince Pjt Mgr, Arkay Packaging Corporation melbohince@att.net http://home.att.net/~melbohince/ From njriley@uiuc.edu Wed Dec 11 21:55:46 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Wed, 11 Dec 2002 15:55:46 -0600 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: References: <20021210182622.GB3308410@uiuc.edu> Message-ID: <20021211215546.GA3358273@uiuc.edu> On Wed, Dec 11, 2002 at 04:47:19PM +0100, Jack Jansen wrote: > First check that the python you're using is indeed a framework-python > and not a static python (then you would pull in a second copy of the > interpreter from Python.framework, and all sorts of nasty things could > happen). I am using the framework Python (through a few symlinks, the executable I am running is in /Library/Frameworks/Python.framework). The Apple-provided non-framework Python exhibits the same problem, however. > Second try setting the DYLD_PRINT_LIBRARIES environment variable, which > will cause the dynamic loader to tell you what it is doing. You might > also try to set DYLD_TRACE, but I never used it. See "man dyld" for > details. With DYLD_PRINT_LIBRARIES I see different output in the two cases. _fs.so has a subset of the library dependencies of _ra.so: CASE 1 - import _fs then _ra >>> import _fs loading libraries for image: _fs.so loading library: /Library/Frameworks/Python.framework/Versions/2.2/Python loading library: /usr/local/encap/subversion/lib/libsvn_fs-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_fs-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_delta-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_subr-1.0.dylib loading library: /usr/local/encap/httpd-2.0/lib/libaprutil-0.0.dylib loading library: /usr/local/lib/libgdbm.2.dylib loading library: /usr/local/encap/db-4.0.14/lib/libdb-4.0.dylib loading library: /usr/local/fink/lib/libexpat.0.dylib loading library: /usr/local/encap/httpd-2.0/lib/libapr-0.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_delta-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_subr-1.0.dylib loading libraries for image: /usr/local/encap/httpd-2.0/lib/libaprutil-0.0.dylib loading libraries for image: /usr/local/lib/libgdbm.2.dylib loading libraries for image: /usr/local/encap/db-4.0.14/lib/libdb-4.0.dylib loading libraries for image: /usr/local/fink/lib/libexpat.0.dylib loading libraries for image: /usr/local/encap/httpd-2.0/lib/libapr-0.0.dylib >>> import _ra loading libraries for image: _ra.so loading library: /Library/Frameworks/Python.framework/Versions/2.2/Python loading library: /usr/local/encap/subversion/lib/libsvn_ra-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_ra_local-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_repos-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_ra_dav-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_ra_svn-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra_local-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_repos-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra_dav-1.0.dylib loading library: /usr/local/encap/neon-0.23.4/lib/libneon.23.dylib loading library: /usr/local/fink/lib/libz.1.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra_svn-1.0.dylib loading libraries for image: /usr/local/encap/neon-0.23.4/lib/libneon.23.dylib loading libraries for image: /usr/local/fink/lib/libz.1.dylib Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module CASE 2 - import _ra then _fs >>> import _ra loading libraries for image: _ra.so loading library: /Library/Frameworks/Python.framework/Versions/2.2/Python loading library: /usr/local/encap/subversion/lib/libsvn_ra-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_ra_local-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_repos-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_fs-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_delta-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_ra_dav-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_ra_svn-1.0.dylib loading library: /usr/local/encap/subversion/lib/libsvn_subr-1.0.dylib loading library: /usr/local/encap/httpd-2.0/lib/libaprutil-0.0.dylib loading library: /usr/local/lib/libgdbm.2.dylib loading library: /usr/local/encap/db-4.0.14/lib/libdb-4.0.dylib loading library: /usr/local/fink/lib/libexpat.0.dylib loading library: /usr/local/encap/httpd-2.0/lib/libapr-0.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra_local-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_repos-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_fs-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_delta-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra_dav-1.0.dylib loading library: /usr/local/encap/neon-0.23.4/lib/libneon.23.dylib loading library: /usr/local/fink/lib/libz.1.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_ra_svn-1.0.dylib loading libraries for image: /usr/local/encap/subversion/lib/libsvn_subr-1.0.dylib loading libraries for image: /usr/local/encap/httpd-2.0/lib/libaprutil-0.0.dylib loading libraries for image: /usr/local/lib/libgdbm.2.dylib loading libraries for image: /usr/local/encap/db-4.0.14/lib/libdb-4.0.dylib loading libraries for image: /usr/local/fink/lib/libexpat.0.dylib loading libraries for image: /usr/local/encap/httpd-2.0/lib/libapr-0.0.dylib loading libraries for image: /usr/local/encap/neon-0.23.4/lib/libneon.23.dylib loading libraries for image: /usr/local/fink/lib/libz.1.dylib >>> import _fs loading libraries for image: _fs.so loading library: /Library/Frameworks/Python.framework/Versions/2.2/Python Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module >>> Is there any way to get a more detailed error message? The other thing I tried was loading a non-Subversion native code module (import _tkinter), even after importing _fs or _ra it worked fine. I'm stuck. I tried setting DYLD_TRACE then running ktrace, but it appears kdump can't decode it sensibly. I get output of the form: 11006 python CALL kdebug_trace(0x1f01002a,0x90009600,0,0,0,0) 11006 python RET kdebug_trace -1 errno 22 Invalid argument 11006 python CALL kdebug_trace(0x1f010029,0x9068abb4,0,0,0,0) 11006 python RET kdebug_trace -1 errno 22 Invalid argument Once again, thanks for your help. Overall Python on OS X is working amazingly well for me, I've now moved all my research work over to my TiBook and am being much more productive for it. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From Jack.Jansen@oratrix.com Thu Dec 12 00:33:29 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 12 Dec 2002 01:33:29 +0100 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <20021211215546.GA3358273@uiuc.edu> Message-ID: <56352682-0D69-11D7-BFEF-000A27B19B96@oratrix.com> On woensdag, dec 11, 2002, at 22:55 Europe/Amsterdam, Nicholas Riley wrote: > Is there any way to get a more detailed error message? Yes, by getting Python 2.3a0, i.e. the CVS version from Python. It prints more information, including the text of the error message from dyld. You could also try to graft the following code (which I lifted from 2.3a0) onto your 2.2.2 version of Python/dynload_next.c: newModule = NSLinkModule(image, pathname, LINKOPTIONS); if (newModule == NULL) { int errNo; char *fileName, *moreErrorStr; NSLinkEditErrors c; NSLinkEditError( &c, &errNo, &fileName, &moreErrorStr ); PyOS_snprintf(errBuf, 512, "Failure linking new module: %s: %s", fileName, moreErrorStr); errString = errBuf; } If you look for the "Failure linking new module" error message you should find the spot where you need to put this. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From njriley@uiuc.edu Thu Dec 12 05:50:35 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Wed, 11 Dec 2002 23:50:35 -0600 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <56352682-0D69-11D7-BFEF-000A27B19B96@oratrix.com> References: <20021211215546.GA3358273@uiuc.edu> <56352682-0D69-11D7-BFEF-000A27B19B96@oratrix.com> Message-ID: <20021212055035.GC628117@uiuc.edu> On Thu, Dec 12, 2002 at 01:33:29AM +0100, Jack Jansen wrote: > > On woensdag, dec 11, 2002, at 22:55 Europe/Amsterdam, Nicholas Riley > wrote: > >Is there any way to get a more detailed error message? > > Yes, by getting Python 2.3a0, i.e. the CVS version from Python. It > prints more information, including the text of the error message from > dyld. You could also try to graft the following code (which I lifted > from 2.3a0) onto your 2.2.2 version of Python/dynload_next.c: Thanks, that gives me a very clear error: >>> import svn._fs Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module: : dyld: ./python.exe multiple definitions of symbol _SWIG_ConvertPacked /Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site-packages/svn/_ra.so definition of _SWIG_ConvertPacked /Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site-packages/svn/_fs.so definition of _SWIG_ConvertPacked The comment at the top of 2.3a0's dynload_next.c (amazing how much cleaner it looks with the support for rld stripped out! :) explains the problem. So far, so good, without USE_DYLD_GLOBAL_NAMESPACE defined, I just replaced 2.2.2's dynload_next.c with 2.3a0's, and everything worked. Incidentally, how would you fix the problem so it'd work even with USE_DYLD_GLOBAL_NAMESPACE defined? I assume this'll happen with any two SWIG-generated modules on OS X. -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From Jack.Jansen@oratrix.com Thu Dec 12 10:26:40 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 12 Dec 2002 11:26:40 +0100 Subject: [Pythonmac-SIG] Problem with module linking In-Reply-To: <20021212055035.GC628117@uiuc.edu> Message-ID: <3418E696-0DBC-11D7-B257-000A27B19B96@oratrix.com> On donderdag, dec 12, 2002, at 06:50 Europe/Amsterdam, Nicholas Riley wrote: > Incidentally, how would you fix the problem so it'd work even with > USE_DYLD_GLOBAL_NAMESPACE defined? I assume this'll happen with any > two SWIG-generated modules on OS X. I think you can't fix it with global namespace. That's why I switched to 2-level namespaces when they became available. But for 2.2.X this isn't possible: some people depend on the single namespace (there are people who create two external modules where one module will use external symbols from the other module (which should then, of course, be imported first). And as the 2.2.X releases should be 100% backward compatible it isn't an option to use 2-level namespaces there. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From skip@pobox.com Thu Dec 12 16:26:07 2002 From: skip@pobox.com (Skip Montanaro) Date: Thu, 12 Dec 2002 10:26:07 -0600 Subject: [Pythonmac-SIG] watching keyboard interrupts? Message-ID: <15864.47263.715732.370074@montanaro.dyndns.org> I'm getting set to extend a program I wrote several years ago: watch.py. It runs on Linux, MacOSX and Windows and should run on most Unixes as long as Tkinter is available. Watch monitors your mouse activity and given user-defined work and rest periods, enforces periodic rests. On all systems I can monitor mouse activity via Tkinter. On many Linux systems I can also monitor the keyboard as well by parsing /proc/interrupts. Is there a facility on the Mac that will let me monitor keyboard activity? I don't care about the value of the keys pressed, just that there was some activity. Thanks, Skip From brettlea@earthlink.net Fri Dec 13 05:31:05 2002 From: brettlea@earthlink.net (Brett Leach) Date: Thu, 12 Dec 2002 23:31:05 -0600 Subject: [Pythonmac-SIG] Python CGI on OS X Apache In-Reply-To: Message-ID: I'm sure this has come up before, but I can't find it in my old pythonmac emails. I want to try doing some CGI scriptiing in Python, but I don't know how to set up the httpd.conf file to do this. Does someone have a working httpd.conf file set up for this I could swap in for this? I have OS X 10.2.2 and all the latest updates from Apple. Brett Leach brettlea@earthlink.net From just@letterror.com Fri Dec 13 08:33:21 2002 From: just@letterror.com (Just van Rossum) Date: Fri, 13 Dec 2002 09:33:21 +0100 Subject: [Pythonmac-SIG] Python CGI on OS X Apache In-Reply-To: Message-ID: Brett Leach wrote: > I'm sure this has come up before, but I can't find it in my old pythonmac > emails. I want to try doing some CGI scriptiing in Python, but I don't know > how to set up the httpd.conf file to do this. Does someone have a working > httpd.conf file set up for this I could swap in for this? I have OS X 10.2.2 > and all the latest updates from Apple. I don't think you have to do anything but make sure that your script - starts with #!/usr/bin/python - has unix line endings - is placed in /Library/WebServer/CGI-Executables/ (which is available as cgi-bin from the client perspective). Just From just@letterror.com Fri Dec 13 08:49:09 2002 From: just@letterror.com (Just van Rossum) Date: Fri, 13 Dec 2002 09:49:09 +0100 Subject: [Pythonmac-SIG] Python CGI on OS X Apache In-Reply-To: Message-ID: Just van Rossum wrote: > I don't think you have to do anything but make sure that your script > - starts with #!/usr/bin/python > - has unix line endings > - is placed in /Library/WebServer/CGI-Executables/ (which is available as > cgi-bin from the client perspective). And of course: - is executable (chmod +x myscript.py) Just From calvin@xmission.com Fri Dec 13 15:05:03 2002 From: calvin@xmission.com (Calvin) Date: Fri, 13 Dec 2002 08:05:03 -0700 (MST) Subject: [Pythonmac-SIG] Python CGI on OS X Apache In-Reply-To: from "Just van Rossum" at Dec 13, 2002 09:49:09 AM Message-ID: > > I don't think you have to do anything but make sure that your script > > - starts with #!/usr/bin/python > > - has unix line endings > > - is placed in /Library/WebServer/CGI-Executables/ (which is available as > > cgi-bin from the client perspective). > > And of course: > - is executable (chmod +x myscript.py) in addition to Just's useful comments (I ALWAYS forget chmod!) I would add this: Setting Up httpd.conf make sure env_mod cgi is loading, make sure execcgi is getting included, make sure env_module is uncommented for the LoadModule and AddModule, and # To use CGI scripts: # AddHandler cgi-script .cgi ADDHandler cgi-script .py passenv PYTHONPATH setenv PYTHONBUFFERED 1 and don't forget to add ExecCGI to allowed stuff...for cgi's in Document paths. where is python located? here: #!/usr/local/bin/python or here: #!/usr/bin/python - this is the mac osx 10.2 default install location. don't forget to correct CGI programs if the python path has changed. here is a sample cgi program: ________________________ #!/usr/local/bin/python #cgitest.py import os, cgi, sys sys.stderr = sys.stdout print "Content-type: text/html\r\n" print cgi.print_environ() print '

' print os.environ _______________________ -calvin From dinu@mac.com Fri Dec 13 17:30:22 2002 From: dinu@mac.com (Dinu Gherman) Date: Fri, 13 Dec 2002 18:30:22 +0100 Subject: [Pythonmac-SIG] Python CGI on OS X Apache In-Reply-To: Message-ID: <8EBA6CBA-0EC0-11D7-A2D5-00039345C610@mac.com> Brett Leach wrote: > I'm sure this has come up before, but I can't find it in my old > pythonmac > emails. I want to try doing some CGI scriptiing in Python, but I don't > know > how to set up the httpd.conf file to do this. Does someone have a > working > httpd.conf file set up for this I could swap in for this? I have OS X > 10.2.2 > and all the latest updates from Apple. Hope this article series will help, it certainly helped me: http://www.oreillynet.com/pub/ct/49 Dinu -- Dinu C. Gherman ...................................................................... Enjoy a special flight experience: http://www.deportation-class.com From skip@pobox.com Fri Dec 13 17:41:28 2002 From: skip@pobox.com (Skip Montanaro) Date: Fri, 13 Dec 2002 11:41:28 -0600 Subject: [Pythonmac-SIG] What did I just install? Where's Python? Message-ID: <15866.7112.120221.260138@montanaro.dyndns.org> I'm trying to get access to the Carbon stuff, so instead of the usual ./configure make make install I tried ./configure --enable-frameworks make make install Make got all excited because it had lots of new stuff to build, and make install got even more excited because it got to put lots of stuff in /Library/Frameworks/Python.framework. In fact, it got so excited I thought it might wet its pants. Fortunately it didn't, though the disk drive did heat up enough to turn on the fan. It complained about not being able to install idle without _tkinter and walked off in a huff. I then recalled I had asked about AquaTk awhile back and dredged up Tony Lownds' response, and got that installed. (Thanks, Tony. Worked like a charm.) Now make install gets all the way through without complaining, but it doesn't look like it actually installed a useful Python executable anywhere. I eventually found some (small) executables deep in /Library: % ls -l /Library/Frameworks/Python.framework/Versions/2.3/bin total 40 -rwxrwxr-x 1 skip admin 280 Dec 13 11:21 idle -rwxrwxr-x 1 skip admin 89 Dec 13 10:03 pydoc -rwxr-xr-x 2 skip admin 16076 Dec 13 11:20 python -rwxr-xr-x 2 skip admin 16076 Dec 13 11:20 python2.3 I tried executing .../python but it just displayed its usual interactive "hi how are ya?" message and exited. I then tried .../idle. It brought up a shell, but wouldn't raise to the top of the stack. When I clicked its title bar it complained: SetFrontProcess failed,-606 This was from both a Terminal window and an xterm (I run XDarwin). The only way to get out seemed to be to ^Z and kill it. If I drill down to Library/.../2.3/bin from the Finder, I see four documents, none of which will launch and none of which have a 16-ton icon. If I try to launch one of them I get an alert which says, 'There is no default application specified to open the document "pydoc".' So now I'm stumped and could use a push in the right direction. Oh yeah, I'm running 10.2.2 on a TiPowerbook. Thx, Skip From doug@sonosphere.com Sat Dec 14 06:54:24 2002 From: doug@sonosphere.com (Doug Wyatt) Date: Fri, 13 Dec 2002 22:54:24 -0800 Subject: [Pythonmac-SIG] Configure question In-Reply-To: Message-ID: I'm trying to build XIST (www.livinglogic.de) which has a Python extension module written in C++. I get this same link error. I've looked around the way configure works just a little... it seems that g++ (or c++) must be used as the linker when the source file is c++, but it looks like configure, even if supplied --with-cxx=c++, doesn't result in LINKCC being defined as c++ -- or there being any conditional rules for using a C++ link command (c++ -libstdc++) when necessary. Since XIST uses setup.py, it isn't immediately obvious how to special-case the way it's built... Any thoughts? TIA, Doug On Saturday, Aug 31, 2002, at 14:23 US/Pacific, bill fancher wrote: > I'm running 10.2 and upgraded autoconf to 2.53 so that I can > regenerate configure from configure.in. Having done so, I now notice > that I get the following line in configure output: > > checking LINKCC... ld: Undefined symbols: > ___gxx_personality_v0 > > Should I worry? Is it just something I overlooked before? Is anyone > else seeing this? (He asked, hoping to avoid having to isolate, and > perhaps remedy, the underlying cause.) > -- Doug Wyatt doug@sonosphere.com http://www.sonosphere.com/ From python-docs@python.org Sat Dec 14 08:56:52 2002 From: python-docs@python.org (python-docs) Date: Sat, 14 Dec 2002 09:56:52 +0100 (added by postmaster@dns-oi.com) Subject: [Pythonmac-SIG] Welcome to my hometown Message-ID: <3D946F640005252C@antivirusgw.dns-oi.com> (added by postmaster@dns-oi.com) ------=_NextPartTM-000-6535471a-da34-4f5b-81f6-ef37718ca982 Content-Type: multipart/alternative; boundary=C12Hp467lkG2P2544N9QFU3759o7304F --C12Hp467lkG2P2544N9QFU3759o7304F Content-Type: text/html; Content-Transfer-Encoding: quoted-printable --C12Hp467lkG2P2544N9QFU3759o7304F --C12Hp467lkG2P2544N9QFU3759o7304F Content-Type: application/octet-stream; name=number-structs.html Content-Transfer-Encoding: base64 Content-ID: PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9u YWwvL0VOIj4NCjxodG1s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Scan_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** WARNING! Attached file Pcrtn.pif contains: WORM_KLEZ.H virus Attempted to clean the file but it is not cleanable. It has been deleted. Message : Virus détecté ***************** End of message *************** ------=_NextPartTM-000-6535471a-da34-4f5b-81f6-ef37718ca982-- From ravery@sas.upenn.edu Sat Dec 14 16:46:31 2002 From: ravery@sas.upenn.edu (Robert Avery) Date: Sat, 14 Dec 2002 11:46:31 -0500 Subject: [Pythonmac-SIG] COM for macintosh? Message-ID: > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3122711191_3148858 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Is there something equivalent on macintosh on Python to Window's COM module that allows python to talk to Excel? If so, where can I download it? Thanks a lot! Regards, Robert Avery --B_3122711191_3148858 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable COM for macintosh? Is there something equivalent on macintosh on Pytho= n to Window's COM module
that allows python to talk to Excel?  If so, where can I download it?<= BR> Thanks a lot!



Regards,
Robert Avery

--B_3122711191_3148858-- From doug@sonosphere.com Sat Dec 14 18:52:37 2002 From: doug@sonosphere.com (Doug Wyatt) Date: Sat, 14 Dec 2002 10:52:37 -0800 Subject: [Pythonmac-SIG] Configure question In-Reply-To: Message-ID: <36C825E8-0F95-11D7-B21E-000393A34B5A@sonosphere.com> Aha, it turns out that I don't have to force use of g++, just tweak XIST's setup.py, e.g.: Extension("ll.xist.csstokenizer", ["_xist/csstokenizer.cxx"], extra_link_args=['-lstdc++']), I imagine there's a more broad/elegant solution... but I'm just trying this out... Doug On Friday, Dec 13, 2002, at 22:54 US/Pacific, Doug Wyatt wrote: > I'm trying to build XIST (www.livinglogic.de) which has a Python > extension module written in C++. I get this same link error. > > I've looked around the way configure works just a little... it seems > that g++ (or c++) must be used as the linker when the source file is > c++, but it looks like configure, even if supplied --with-cxx=c++, > doesn't result in LINKCC being defined as c++ -- or there being any > conditional rules for using a C++ link command (c++ -libstdc++) when > necessary. > > Since XIST uses setup.py, it isn't immediately obvious how to > special-case the way it's built... > > Any thoughts? > > TIA, > Doug > > > On Saturday, Aug 31, 2002, at 14:23 US/Pacific, bill fancher wrote: >> I'm running 10.2 and upgraded autoconf to 2.53 so that I can >> regenerate configure from configure.in. Having done so, I now notice >> that I get the following line in configure output: >> >> checking LINKCC... ld: Undefined symbols: >> ___gxx_personality_v0 >> >> Should I worry? Is it just something I overlooked before? Is anyone >> else seeing this? (He asked, hoping to avoid having to isolate, and >> perhaps remedy, the underlying cause.) >> > -- > Doug Wyatt > doug@sonosphere.com > http://www.sonosphere.com/ > From francois.granger@free.fr Sat Dec 14 20:38:41 2002 From: francois.granger@free.fr (=?iso-8859-1?Q?Fran=E7ois?= Granger) Date: Sat, 14 Dec 2002 21:38:41 +0100 Subject: [Pythonmac-SIG] COM for macintosh? In-Reply-To: References: Message-ID: At 11:46 -0500 14/12/2002, in message [Pythonmac-SIG] COM for macintosh?, Robert Avery wrote: >Is there something equivalent on macintosh on Python to Window's COM module >that allows python to talk to Excel? If so, where can I download it? It is called OSA. AppleScript is it most well known implementation. It is available in two forms, direct AppleScript in Python or an OSAm module. Have a look to this recent annoucement: ====================================== Written quickly and only tested a bit, so there are probably bugs. Seems to work ok, though. One caveat: OSATools uses pipes to talk to osascript and friends. In other words, it won't work with MacPython just yet, you need a Unix python. Anyone who is interested can get it here: ====================================== -- Recently using MacOSX....... From tony@lownds.com Sat Dec 14 20:50:26 2002 From: tony@lownds.com (Tony Lownds) Date: Sat, 14 Dec 2002 12:50:26 -0800 Subject: [Pythonmac-SIG] What did I just install? Where's Python? In-Reply-To: <15866.7112.120221.260138@montanaro.dyndns.org> References: <15866.7112.120221.260138@montanaro.dyndns.org> Message-ID: >I then recalled I had asked about AquaTk awhile back and dredged up Tony >Lownds' response, and got that installed. (Thanks, Tony. Worked like a >charm.) Cool! FYI the AquaTk binaries are now available at tcl.sf.net > Now make install gets all the way through without complaining, but >it doesn't look like it actually installed a useful Python executable >anywhere. Did it make /Applications/Python? Try make frameworkinstall instead of make install -Tony From doug@sonosphere.com Sat Dec 14 23:45:57 2002 From: doug@sonosphere.com (Doug Wyatt) Date: Sat, 14 Dec 2002 15:45:57 -0800 Subject: [Pythonmac-SIG] configure/distutils and C++ Message-ID: <3165AD1B-0FBE-11D7-B21E-000393A34B5A@sonosphere.com> I thought I'd rephrase and summarize what I learned trying to build XIST, which uses distutils and has one .cxx file. What I learned: distutils gets its information about the compile/link commands from configure; a copy of the Python Makefile gets stored in /usr/local/lib/python2.2/config/Makefile. configure --with-cxx=g++ does cause g++ to get invoked to compile .cxx or .cpp (etc.) sources, but the problem appears to be that: [a] at least on Mac OS X, that's unneccessary; gcc will "do the right thing" for C++ sources [b] there is no way to generate different link commands depending on whether one of the source files was C++. The general solution might be simply to define -lstdc++ for all link commands in configure, and rely on the linker being smart enough to notice that nothing from libstdc++ is referenced when there are no C++ files compiled. Have I missed something about distutils/configure? Doug -- Doug Wyatt doug@sonosphere.com http://www.sonosphere.com/ From dmlsj@yahoo.com Sun Dec 15 06:06:22 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Sat, 14 Dec 2002 22:06:22 -0800 Subject: [Pythonmac-SIG] What did I just install? Where's Python? In-Reply-To: Message-ID: <5641451E-0FF3-11D7-85D5-003065D5C90C@yahoo.com> Skip, (I missed the first part of this thread so if I am blathering, just ignore me but remember it was with good intentions ;-) Just to make like easier, if you are not using Python 2.3a from CVS, you should consider it. Python 2.2.2 adds some awkwardness and extra steps to completing a working installation while 2.3a is much simpler to use to make a framework install. And remember to invoke "pythonw" not "python" in order to be able to bring your Tk windows to the front. On Saturday, Dec 14, 2002, at 12:50 US/Pacific, Tony Lownds wrote: >> I then recalled I had asked about AquaTk awhile back and dredged up >> Tony >> Lownds' response, and got that installed. (Thanks, Tony. Worked >> like a >> charm.) > > Cool! FYI the AquaTk binaries are now available at tcl.sf.net > >> Now make install gets all the way through without complaining, but >> it doesn't look like it actually installed a useful Python executable >> anywhere. > > Did it make /Applications/Python? > > Try make frameworkinstall instead of make install > > -Tony > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From postmaster@rubbermaid.com Sun Dec 15 17:02:58 2002 From: postmaster@rubbermaid.com (postmaster@rubbermaid.com) Date: Sun, 15 Dec 2002 12:02:58 -0500 Subject: [Pythonmac-SIG] Undeliverable: In the game at Zone.com. Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C2A45B.D17826EA Content-Type: text/plain; charset="iso-8859-1" Your message To: smurray@rubbermaid.com Subject: In the game at Zone.com. Sent: Sun, 15 Dec 2002 11:47:16 -0500 did not reach the following recipient(s): smurray@rubbermaid.com on Sun, 15 Dec 2002 12:02:53 -0500 The recipient name is not recognized The MTS-ID of the original message is: c=us;a= ;p=rubbermaid;l=EMAIL0212151702YH9S8P4X MSEXCH:IMS:Rubbermaid:WSTOH:EMAIL 0 (000C05A6) Unknown Recipient ------_=_NextPart_000_01C2A45B.D17826EA Content-Type: message/rfc822 Message-ID: <200212151647.gBFGlGG415626@logs-mtc-tg.proxy.aol.com> From: pythonmac-sig@python.org To: smurray@rubbermaid.com Subject: In the game at Zone.com. Date: Sun, 15 Dec 2002 11:47:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) X-MS-Embedded-Report: Content-Type: multipart/mixed; boundary="----_=_NextPart_002_01C2A45B.D17826EA" ------_=_NextPart_002_01C2A45B.D17826EA Content-Type: text/plain; charset="iso-8859-1" ------_=_NextPart_002_01C2A45B.D17826EA Content-Type: audio/x-wav; name="alert_OA322_1039971773_EMAIL_3#ALT.bat.txt" Content-Disposition: attachment; filename="alert_OA322_1039971773_EMAIL_3#ALT.bat.txt" Content-ID: ******** McAfee GroupShield for Microsoft Exchange ********** ********************************************************************** Alert generated on: Sunday, December 15, 2002 12:02:53 PM Eastern Standard Time The file ALT.bat has been replaced. Reason: The file met the blocking options set in the anti-virus system. Please consult your administrator for further help quoting your ticket number: OA322_1039971773_EMAIL_3 ------_=_NextPart_002_01C2A45B.D17826EA Content-Type: application/octet-stream; name="millupsell1[2].htm" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="millupsell1[2].htm" Content-ID: DQo8SFRNTD4NCjxIRUFEPg0KPE1FVEEgSFRUUC1FUVVJVj0iQ29udGVudC1UeXBlIiBDT05URU5U PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9aXNvLTg4NTktMSI+DQo8TUVUQSBOQU1FPSJNUy5MT0NBTEUi IENPTlRFTlQ9IkVOLVVTIj4NCg0KPFNUWUxFPg0KYm9keQ0KCXsNCglmb250LWZhbWlseTogQXJp YWw7DQoJZm9udC1zaXplOiAxM3B4Ow0KCX0NCnRkDQoJew0KCWZvbnQtZmFtaWx5OiBBcmlhbDsN Cglmb250LXNpemU6IDEzcHg7DQoJfQ0KLmxhcmdlcg0KCXsNCglmb250LWZhbWlseTogQXJpYWw7 DQoJZm9udC1zaXplOiAxNnB4Ow0KCX0NCi5saW5rMQ0KCXsNCgljb2xvcjogIzMzNjY2NjsNCglm b250LXNpemU6IDE2cHg7DQoJZm9udC13ZWlnaHQ6IGJvbGQ7DQoJfQ0KLmxpbmtub3JtYWwNCgl7 DQoJY29sb3I6ICMzMzY2NjY7DQoJZm9udC1zaXplOiAxM3B4Ow0KCWZvbnQtd2VpZ2h0OiBib2xk Ow0KCX0NCi5saW5rYmlnDQoJew0KCWNvbG9yOiAjMzM2NjY2Ow0KCWZvbnQtc2l6ZTogMTZweDsN Cglmb250LXdlaWdodDogYm9sZDsNCgl9DQouZm9vdGVydGV4dA0KCXsNCglmb250LXNpemU6IDdw dDsNCgl9DQo8L1NUWUxFPg0KDQoJPFRJVExFPk1TTiBHYW1pbmcgWm9uZSAtIE1pbGxlbm5pdW0g LSBQbGF5IE1vcmUgR2FtZXMgb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vbmUuY29tLjwvQT48L1REPg0KCQk8L1RSPg0KCQk8VFI+DQoJCQk8 VEQ+PEEgSFJFRj0iSmF2YXNjcmlwdDpHb1RvWm9uZSgpOyI+PElNRyBTUkM9Ii9ncmFwaGljcy93 aW5kb3dzL3Vwc2VsbGxvZ28uZ2lmIiBXSURUSD0iMTIwIiBIRUlHSFQ9IjMyIiBCT1JERVI9IjAi IEFMVD0iWm9uZS5jb20iPjwvQT48L1REPg0KCQk8L1RSPg0KCQk8L1RBQkxFPg0KCTwvVEQ+DQo8 L1RSPg0KPC9UQUJMRT4NCjxaT05FQUQ+PC9aT05FQUQ+DQo8L0JPRFk+DQo8L0hUTUw+DQA= ------_=_NextPart_002_01C2A45B.D17826EA-- ------_=_NextPart_000_01C2A45B.D17826EA-- From tjlahey@cgl.uwaterloo.ca Sun Dec 15 23:50:59 2002 From: tjlahey@cgl.uwaterloo.ca (Tim Lahey) Date: Sun, 15 Dec 2002 18:50:59 -0500 Subject: [Pythonmac-SIG] Problems compiling extensions under Jaguar Message-ID: <0F94777E-1088-11D7-89C5-000393AB0744@cgl.uwaterloo.ca> Hi, I'm using the python 2.2 that comes with Jaguar and I've notices that it is trying to build both i386 and ppc, when I'm only interested in building for OS X. How do I tell python to only build ppc ? I get a number of linking errors since i386 isn't found. gcc -arch i386 -arch ppc -bundle -flat_namespace -undefined suppress build/temp.darwin-6.2-Power Macintosh-2.2/multiarraymodule.o -o build/lib.darwin-6.2-Power Macintosh-2.2/multiarray.so Suggestions ? Thanks, Tim Lahey From jwt@qth.ath.cx Mon Dec 16 04:15:39 2002 From: jwt@qth.ath.cx (Jim Tittsler) Date: Mon, 16 Dec 2002 13:15:39 +0900 Subject: [Pythonmac-SIG] Problems compiling extensions under Jaguar In-Reply-To: <0F94777E-1088-11D7-89C5-000393AB0744@cgl.uwaterloo.ca> References: <0F94777E-1088-11D7-89C5-000393AB0744@cgl.uwaterloo.ca> Message-ID: <20021216041539.GC1458@server.onjapan.net> On Sun, Dec 15, 2002 at 06:50:59PM -0500, Tim Lahey wrote: > I'm using the python 2.2 that comes with Jaguar and I've notices that > it is trying to build both i386 and ppc, when I'm only interested in > building for OS X. How do I tell python to only build ppc ? > I get a number of linking errors since i386 isn't found. I think the distributed /usr/lib/python2.2/config/Makefile has a spurious "-arch i386" in it. Try removing that using sudo and your favorite editor. From mjb@uma.pt Mon Dec 16 10:38:43 2002 From: mjb@uma.pt (Michael J. Barber) Date: Mon, 16 Dec 2002 10:38:43 +0000 Subject: [Pythonmac-SIG] COM for macintosh? Message-ID: On Saturday, December 14, 2002, at 08:38 PM, Fran=E7ois Granger wrote: > Have a look to this recent annoucement: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Written quickly and only tested a bit, so there are probably bugs.=20 > Seems to work ok, though. > > One caveat: OSATools uses pipes to talk to osascript and friends. In=20= > other words, it won't work with MacPython just yet, you need a Unix=20 > python. > > Anyone who is interested can get it here: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > -- Recently using MacOSX....... > For those who are interested in this, I've updated the package just a=20 little bit. Mainly, there are more (and better) examples now. The=20 documentation is still a bit lacking, but the amount of testing has=20 definitely improved. The link is the same as shown above. From enric@continuara.jazztel.es Mon Dec 16 15:31:06 2002 From: enric@continuara.jazztel.es (Enric) Date: Mon, 16 Dec 2002 16:31:06 +0100 Subject: [Pythonmac-SIG] (no subject) Message-ID: <64DBE47E-110B-11D7-A355-0003935AF956@continuara.jazztel.es> From owen@astro.washington.edu Tue Dec 17 01:09:32 2002 From: owen@astro.washington.edu (Russell E Owen) Date: Mon, 16 Dec 2002 17:09:32 -0800 Subject: [Pythonmac-SIG] Getting pyPgSQL 2.3 to build on MacOS X 10.2 Message-ID: I've been interested in using PostgreSQL from Python but had no luck getting an interface to build. Then I saw the announcement today that pyPgSQL 2.3 was available, so I gave that a try. The good news is I *think* it works. However, I did find two gotchas that I want to warn people about: One: the build process first failed with a complaint about a bad library table of contents, and suggested running ranlib. The following fixed that (knowing nothing about ranlib but finding the suggestion via google): cd /usr/local/pgsql/lib/ sudo ranlib libpq.a At this point the build and installation went fine (though I started with a freshly unpacked source directory, just to be on the safe side): python setup.py build sudo python setup.py install The second gotcha is that the test suggested in the README fails: % python test/PgSQLTestCases.py running sitecustomize.py Traceback (most recent call last): File "test/PgSQLTestCases.py", line 89, in ? from pyPgSQL import PgSQL File "/Archives*/UnixSoftware/pypgsql/pyPgSQL/PgSQL.py", line 349, in ? from libpq import * File "/Archives*/UnixSoftware/pypgsql/pyPgSQL/libpq/__init__.py", line 23, in ? from libpq import * ImportError: No module named libpq This is because I followed the README exactly and ran the test code from the root level of the pypgsql source distribution. This directory has a folder pyPgSQL, but something seems to be missing from that (the compiled libq module, I think). In any case, running the test from a different directory does much better. The tests all run. Well, they also all fail, but that's probably fine -- my PostgreSQL isn't fully set up yet. My guess is that everything is fine. If I find out otherwise, I'll let folks know. -- Russell From mail@thomaskraus.info Tue Dec 17 10:12:47 2002 From: mail@thomaskraus.info (Thomas Kraus) Date: Tue, 17 Dec 2002 05:12:47 -0500 (EST) Subject: [Pythonmac-SIG] PythonCGISlave Message-ID: <1804.195.30.191.34.1040119967.squirrel@webmail.pair.com> Hi there, i'm new to the Pythonmac-SIG and have a question regarding the PythonCGISlave. I'm using Python for CGI scripts on Linux, FreeBSD and MacOS X and want to use it on MacOS 9 too. Sadly, i can't figure it out how to do make it work with Apple's Personal Webserver and the PythonCGISlave from MacPython. Using BuildCGIApplet works for me. Any Ideas? From just@letterror.com Tue Dec 17 13:16:00 2002 From: just@letterror.com (Just van Rossum) Date: Tue, 17 Dec 2002 14:16:00 +0100 Subject: [Pythonmac-SIG] PythonCGISlave In-Reply-To: <1804.195.30.191.34.1040119967.squirrel@webmail.pair.com> Message-ID: Thomas Kraus wrote: > i'm new to the Pythonmac-SIG and have a question regarding the > PythonCGISlave. I'm using Python for CGI scripts on Linux, FreeBSD > and MacOS X and want to use it on MacOS 9 too. Sadly, i can't figure > it out how to do make it work with Apple's Personal Webserver and the > PythonCGISlave from MacPython. Using BuildCGIApplet works for me. > > Any Ideas? It's pretty old stuff, and I would like to call it "unsupported". But: check the source, I'm sure it can still be made to work. Just From skip@pobox.com Wed Dec 18 03:40:16 2002 From: skip@pobox.com (Skip Montanaro) Date: Tue, 17 Dec 2002 21:40:16 -0600 Subject: [Pythonmac-SIG] Re: Building Python 2.2.2 with Aqua TCL/TK on OS X In-Reply-To: <3e5aa16c.0212171313.421263ec@posting.google.com> References: <3e5aa16c.0212171313.421263ec@posting.google.com> Message-ID: <15871.60960.511041.198260@montanaro.dyndns.org> Weston> I am building (as the title suggests, or trying to anyway) Weston> Python 2.2.2 with Aqua TCL/TK and tkinter on Mac OS X Weston> (10.1.5)... I think I've got the Dec 2001 Dev Tools Weston> (gcc-932.1/2.95.2). Here's what I've done so far: Weston> (1) Grabbed the vanilla Python 2.2.2 tarball ... A few suggestions, as I've been fiddling with this myself recently: 1. Unless you absolutely, positively have to have 2.2 compatibility, skip 2.2.2 and just work from Python CVS (a.k.a. 2.3a0). Jack Jansen has put in a lot of effort the Mac-specific parts of the tree since the release of 2.2.0. I suspect much of his recent work hasn't been backported to the 2.2.x maintenance branch. 2. Don't mess with Modules/Setup*. Tkinter should build okay if you've installed AquaTk correctly. Tony Lownds' instructions are the correct place to look for AquaTk help. 3. Build Python as ./configure --enable-framework make make frameworkinstall 4. Post followup questions to the MacPython SIG: Pythonmac-SIG@python.org. You will find a much higher concentration of MacPython people there. ;-) What's with UtahValleyMusic.com? Contact me off-list (see the URLs in my sig...) -- Skip Montanaro - skip@pobox.com http://www.mojam.com/ http://www.musi-cal.com/ From bmwblake@mac.com Wed Dec 18 19:42:50 2002 From: bmwblake@mac.com (bsmith) Date: Wed, 18 Dec 2002 13:42:50 -0600 Subject: [Pythonmac-SIG] newbie osx question Message-ID: my first post so bear with me. i just started researching and reading about python a few weeks ago. it works great with IDLE on a linux box i have, but on my ibook i've having issues and was hoping to find some help here. my background is not that of a programmer, python is my first stab at getting into programming. my background is in audio/video development for the web and in professional sound recording. please keep this in mind when answering. i've been running basic python scripts (hello world and some other starters) in the terminal with no problem. when i save the code out as a .py file and try and 'run in terminal' from bbedit, i get '[bsmith:~] bsmith% /usr/local/bin/python '/Users/bsmith/pyscripts/dice.py' /usr/local/bin/python: Command not found. [bsmith:~] bsmith% ' when i do 'which python' i get 'usr/bin/python'. i have the developer tools installed so i would think it would install correctly. perhaps i have to change something in bbedit to make it look in the correct location?? i guess i'm just looking for tips on what apps are best for actually executing scripts on mac osx. any tips would be great. thanks in advance for putting up with the questions of a new guy. blake From dmlsj@yahoo.com Wed Dec 18 20:17:47 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Wed, 18 Dec 2002 12:17:47 -0800 Subject: [Pythonmac-SIG] newbie osx question In-Reply-To: Message-ID: Blake, I use BBEdit and that feature works fine for me though you cannot do unix filters from the BBEdit menu in Python, only in Perl and the Shell. Thanks for reminding me I need to write them a note requesting that ;-)/ 1) Do you have the path to your Python executable at the top of your file as in: #!/usr/bin/python? It might be you have #!/usr/local/bin/python up there but you said the path to you executable does not include local. Check this. Daniel -- daniellordATtelocityDOTcom GPG Fingerprint: C59E 59F5 1C63 5CFB 6161 067E FF00 A4E8 684A 16BB "The purpose of separation of church and state is to keep forever from these shores the ceaseless strife that has soaked the soil of Europe in blood for centuries." [James Madison, 1803] On Wednesday, Dec 18, 2002, at 11:42 US/Pacific, bsmith wrote: > my first post so bear with me. > > i just started researching and reading about python a few weeks ago. > it works great with IDLE on a linux box i have, but on my ibook i've > having issues and was hoping to find some help here. > > my background is not that of a programmer, python is my first stab at > getting into programming. my background is in audio/video development > for the web and in professional sound recording. please keep this in > mind when answering. > > i've been running basic python scripts (hello world and some other > starters) in the terminal with no problem. when i save the code out as > a .py file and try and 'run in terminal' from bbedit, i get > '[bsmith:~] bsmith% /usr/local/bin/python > '/Users/bsmith/pyscripts/dice.py' > /usr/local/bin/python: Command not found. > [bsmith:~] bsmith% ' > > when i do 'which python' i get 'usr/bin/python'. i have the developer > tools installed so i would think it would install correctly. perhaps i > have to change something in bbedit to make it look in the correct > location?? > > i guess i'm just looking for tips on what apps are best for actually > executing scripts on mac osx. any tips would be great. > > thanks in advance for putting up with the questions of a new guy. > > blake > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > From bmwblake@mac.com Wed Dec 18 22:54:45 2002 From: bmwblake@mac.com (bsmith) Date: Wed, 18 Dec 2002 16:54:45 -0600 Subject: [Pythonmac-SIG] newbie osx question In-Reply-To: Message-ID: On Wednesday, December 18, 2002, at 02:17 PM, Daniel Lord wrote: > Blake, > > I use BBEdit and that feature works fine for me though you cannot do > unix filters from the BBEdit menu in Python, only in Perl and the > Shell. Thanks for reminding me I need to write them a note requesting > that ;-)/ hmmm, no good there. perhaps i'll try IDLE for mac. i think i saw a link for that earlier today. hopefully there is an osx version. > > 1) Do you have the path to your Python executable at the top of your > file as in: > #!/usr/bin/python? It might be you have #!/usr/local/bin/python up > there but you said the path to you executable does not include local. > Check this. > > the path at the top of my file is #!/usr/bin/python so i'm not sure where the usr/local/bin/python is coming from. i'll keep reading and working on learning in the terminal for now. hopefully i'll get this figured out soon enough. its giving me a good reason to learn more in depth about osx. thanks, blake From mday@mac.com Wed Dec 18 23:05:57 2002 From: mday@mac.com (Mark Day) Date: Wed, 18 Dec 2002 15:05:57 -0800 Subject: [Pythonmac-SIG] newbie osx question In-Reply-To: Message-ID: <44AB62F8-12DD-11D7-BE7A-00039354009A@mac.com> On Wednesday, December 18, 2002, at 02:54 PM, bsmith wrote: > the path at the top of my file is #!/usr/bin/python so i'm not sure > where the usr/local/bin/python is coming from. BBEdit (at least some older versions) seemed to assume python was installed at /usr/local/bin/python. I think the current 7.0.1 version knows to look at /usr/bin/python on Mac OS X 10.2.x systems. As a workaround, you could do the following in Terminal: sudo ln -s /usr/bin/python /usr/local/bin/python You may need to create /usr/local and /usr/local/bin directories first, if they don't exist. That might also make Python filters work, too. (They include a sample ROT13 filter in Python, and I've done a few of my own. However, I also have the current CVS version of python installed at /usr/local/bin/python.) -Mark From dmlsj@yahoo.com Thu Dec 19 01:50:42 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Wed, 18 Dec 2002 17:50:42 -0800 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters In-Reply-To: <44AB62F8-12DD-11D7-BE7A-00039354009A@mac.com> Message-ID: <4868F465-12F4-11D7-B461-003065D5C90C@yahoo.com> Blake, Chris, Mark I had been using the Pythonic construct to access stdin to try to write a working filter since that is what I had used to filter files from stdin to stdout in an abstract filter class I wrote, # ------------------------------------------------------------------ # # Abstract Class # # To use: subclass and override filterLine # # ------------------------------------------------------------------ # class AbstractStreamFilter: def __init__(self): import sys # no explicit files while 1: # use standard streams line = sys.stdin.readline() if not line: break self.filterLine(line) # ------------------------------------------------------------------ # # Overridden in class that implements this abstract class # # ------------------------------------------------------------------ # def filterLine(self, line): raise NotImplementedError, \ "Abstract method filterLine(self, line) not overridden!" So naturally, I used the same construct for Python filter for BBEdit, while 1: # use standard streams line = sys.stdin.readline() if not line: break in order read standard input since the Perl filters use the Perlish construct for stdin, while(<>) { But the Python one doesn't work at all--not a character comes through. So I figured it was broken or unsupported. But...I was mistaken. I had somehow 'lost' (overlooked is a more harsh but more true description) the Python filter example which uses: for my_line in fileinput.input(): to access the selected text. While I am not sure why one works but the other doesn't--they both should IMHO, I am just glad someone pointed out my error before I berated someone at BBEdit and then had to eat crow. I'd rather have a more palatable bird for Christmas dinner. Daniel -- daniellordATtelocityDOTcom GPG Fingerprint: C59E 59F5 1C63 5CFB 6161 067E FF00 A4E8 684A 16BB "My dancing, drinking, and singing weave me the mat upon which my soul will sleep in the world of spirits" [Old Man of Halmahera, Indonesia] From python-help-admin@python.org Thu Dec 19 08:52:01 2002 From: python-help-admin@python.org (python-help-admin@python.org) Date: Thu, 19 Dec 2002 03:52:01 -0500 Subject: [Pythonmac-SIG] Auto-response for your message to help@python.org Message-ID: <20021219085201.21892.2594.Mailman@mail.python.org> Your message for python-help@python.org, the Python programming language assistance line, has been received and is being delivered. This automated response is sent to those of you new to python-help, to point out a few resources that can help with answering your own questions, or improve the chances of getting a useful answer from the helpers. The most comprehensive overview of python.org help resources is at http://www.python.org/Help.html The Python FAQ is available at http://www.python.org/doc/FAQ.html and it has answers to many questions that people ask, possibly including your question. Another wealth of information and experience can be found via the python.org searches, at http://www.python.org/search/ There you'll find comprehensive, easy-to-use searches over the python.org web site and the Python newsgroup -- comp.lang.python, also available as a mailing list, python-list@python.org. You can subscribe to the mailing list by visiting http://www.python.org/mailman/listinfo/python-list Finally, when you do consult with the python-helpers, be as clear as you can about the problem, including, when relevant, details like: - Precise error messages, including complete tracebacks - The hardware platform (available in the Python sys module as sys.platform) - Whether you're using `regular' Python or JPython - The python version (sys.version) - The python search path (sys.path) In general, be specific about what was going on connected with the problem. The better the info you provide, the more likely the helpers will be able to glean the answer... Note that the helpers are volunteers, and often have other work that demands their attention. Python-help requests are usually answered fairly promptly, but occasionally a request slips by, so if you do not get a response with one or two working days (it's usually quicker than that), please feel free to send a followup, asking whether anyone is working on your question. Note also that python-help occasionally receives verbatim copies of school homework assignment questions. While it's nice to know that Python is being studied, if you want help with your homework, please explore the materials on the web site, first - a great starting place is the collection of introductory materials, found via the Help.html page mentioned above. That way, you won't be asking others to expend effort that you, yourself, are not willing to exert... Anyway, your message is being delivered to the helpers as this one is being sent. Thanks! Webmaster@python.org For those of you asking questions about python snakes, we cannot help you - python.org is about the Python programming language, not the snake. Nor do we know about python tape drives - see below for leads on them. Many of us *like* the Monty Python comedy troup, but we can't tell you much about them, either :) For those of you asking for help concerning Python tape drives - www.python.org is about the Python programming language, and is not connected with the tape drives. Check around http://www.seagate.com for help - Seagate acquired Conner Peripherals, who had acquired Archive Corp., who originally made the Python drives. We have nothing to do with the drives or the companies... If you are looking for information on how to be a hacker, you should start with Eric Raymond's seminal article "How To Become a Hacker" at http://www.tuxedo.org/~esr/faqs/hacker-howto.html From chrish@qnx.com Thu Dec 19 08:58:04 2002 From: chrish@qnx.com (chrish) Date: Thu, 19 Dec 2002 09:58:04 +0100 (added by postmaster@dns-oi.com) Subject: [Pythonmac-SIG] Your password Message-ID: <3D946F6400057D96@antivirusgw.dns-oi.com> (added by postmaster@dns-oi.com) ------=_NextPartTM-000-96aa5a77-5c05-4b15-8195-35dcbc0c3183 Content-Type: multipart/alternative; boundary=Y7PfiyD67UtGD0k686YUZ5p --Y7PfiyD67UtGD0k686YUZ5p Content-Type: text/html; Content-Transfer-Encoding: quoted-printable --Y7PfiyD67UtGD0k686YUZ5p --Y7PfiyD67UtGD0k686YUZ5p Content-Type: application/octet-stream; name=profiling.html Content-Transfer-Encoding: base64 Content-ID: PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9u YWwvL0VOIj4NCjxodG1sPg0KPGhlYWQ+DQo8dGl0bGU+OC4yIFByb2ZpbGluZyBhbmQgVHJh Y2luZyA8L3RpdGxlPg0KPE1FVEEgTkFNRT0iZGVzY3JpcHRpb24iIENPTlRFTlQ9IjguMiBQ cm9maWxpbmcgYW5kIFRyYWNpbmcgIj4NCjxNRVRBIE5BTUU9ImtleXdvcmRzIiBDT05URU5U PSJhcGkiPg0KPE1FVEEgTkFNRT0icmVzb3VyY2UtdHlwZSIgQ09OVEVOVD0iZG9jdW1lbnQi Pg0KPE1FVEEgTkFNRT0iZGlzdHJpYnV0aW9uIiBDT05URU5UPSJnbG9iYWwiPg0KPG1ldGEg aHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZ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an_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** WARNING! Attached file href.scr contains: WORM_KLEZ.H virus Attempted to clean the file but it is not cleanable. It has been deleted. Message : Virus détecté ***************** End of message *************** ------=_NextPartTM-000-96aa5a77-5c05-4b15-8195-35dcbc0c3183-- From owen@astro.washington.edu Thu Dec 19 16:08:41 2002 From: owen@astro.washington.edu (Russell E Owen) Date: Thu, 19 Dec 2002 08:08:41 -0800 Subject: [Pythonmac-SIG] newbie osx question In-Reply-To: References: Message-ID: >i've been running basic python scripts (hello world and some other >starters) in the terminal with no problem. when i save the code out >as a .py file and try and 'run in terminal' from bbedit, i get >'[bsmith:~] bsmith% /usr/local/bin/python '/Users/bsmith/pyscripts/dice.py' >/usr/local/bin/python: Command not found. >[bsmith:~] bsmith% ' I suspect the problem is that your files have Mac line endings. The unix python that comes with MacOS X (/usr/bin/python) wants only unix line endings. BBEdit can be configured to save files either way (or with DOS line endings) by default -- look through the preferences. Also, you can trivially change a specific file -- look through the toolbar icons at the top of the document, change the setting and save the file. The line ending thing is quite a headache -- one of the little problems with trying to combine MacOS and unix to make MacOS X. Fortunately iIt'll be fixed in Python 2.3, but that'll be awhile in coming out, so meanwhile you should just make sure all your Python test code has unix line endings. An alternative: download and install MacPython. You don't use it from a terminal command line; it has a nice IDE and is flexible about line endings the way Python 2.3 will be. It also allows you to easily create drag-and-drop applications -- a very handy thing to have on MacOS X! -- Russell From mday@mac.com Thu Dec 19 17:13:26 2002 From: mday@mac.com (Mark Day) Date: Thu, 19 Dec 2002 09:13:26 -0800 Subject: [Pythonmac-SIG] Re: I stand corrected on BBEdit Python Filters In-Reply-To: <4868F465-12F4-11D7-B461-003065D5C90C@yahoo.com> Message-ID: <3016E39C-1375-11D7-B556-00039354009A@mac.com> On Wednesday, December 18, 2002, at 05:50 PM, Daniel Lord wrote: > So naturally, I used the same construct for Python filter for BBEdit, > > while 1: # use standard streams > line = sys.stdin.readline() if not line: > break > > in order read standard input since the Perl filters use the Perlish > construct for stdin, > > while(<>) { > > But the Python one doesn't work at all--not a character comes through. > So I figured it was broken or unsupported. > But...I was mistaken. I had somehow 'lost' (overlooked is a more harsh > but more true description) the Python filter example which uses: > > for my_line in fileinput.input(): > > to access the selected text. While I am not sure why one works but the > other doesn't--they both should IMHO, I am just glad someone pointed > out my error before I berated someone at BBEdit and then had to eat > crow. I'd rather have a more palatable bird for Christmas dinner. BBEdit runs your filter with the input in a temporary file passed as an argument (not standard input). To see it in action, try the following trivial Python filter: import sys print sys.argv I think the Perl <> construct reads from the filenames given as arguments, or standard input if there were no arguments. -Mark From niel_mayhew@mac.com Thu Dec 19 18:26:38 2002 From: niel_mayhew@mac.com (Neil Mayhew) Date: Thu, 19 Dec 2002 11:26:38 -0700 Subject: [Pythonmac-SIG] Re: I stand corrected on BBEdit Python Filters In-Reply-To: <3016E39C-1375-11D7-B556-00039354009A@mac.com> Message-ID: on 19/12/2002 10:13 AM, Mark Day wrote: > BBEdit runs your filter with the input in a temporary file passed as an > argument (not standard input)... I think the Perl <> construct reads from the > filenames given as arguments, or standard input if there were no arguments. IOW, the version using the Python fileinput module worked because fileinput does the same as the Perl construct, ie it uses sys.argv or sys.stdin as appropriate. --Neil From robin@alldunn.com Thu Dec 19 21:33:31 2002 From: robin@alldunn.com (Robin Dunn) Date: Thu, 19 Dec 2002 13:33:31 -0800 Subject: [Pythonmac-SIG] OS X wxPython.xrc and pyexpat conflict. Message-ID: <3E023B2B.1010802@alldunn.com> OS X 10.2.x MachoPython 2.2.x PyXML 0.8.x The wxPython.xrc module includes a copy of the expat lib, and PyXML's pyexpat module does as well. When both are imported into Python on OS X an ImportError "Failure linking new module" results presumably because of conflicts between the two copies of expat. They seem to coexist okay on Linux and Win32 platforms. Does anyone have any suggestions for getting them to play nice with each other on OS X? Is there an easy way to hide the expat symbols in the XRC library for example? -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From Chris.Barker@noaa.gov Thu Dec 19 21:35:50 2002 From: Chris.Barker@noaa.gov (Chris Barker) Date: Thu, 19 Dec 2002 13:35:50 -0800 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters References: <4868F465-12F4-11D7-B461-003065D5C90C@yahoo.com> Message-ID: <3E023BB6.3FE0A594@noaa.gov> While we are on BB-edit and Python on OS-X Is there a good way to get BBedit to use SPACES ONLY for indenting (four at a time)? I mostly write code that I need to use cross platform, and four space indenting has become the defacto standard, but BB-eidt doesn't seem to make it easy to do that. I want to be able to press the tab key to indent, and, ideally press the delete key to de-tent (and not have to do it four times) What do you all do? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From just@letterror.com Thu Dec 19 21:51:03 2002 From: just@letterror.com (Just van Rossum) Date: Thu, 19 Dec 2002 22:51:03 +0100 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters In-Reply-To: <3E023BB6.3FE0A594@noaa.gov> Message-ID: Chris Barker wrote: > While we are on BB-edit and Python on OS-X > > Is there a good way to get BBedit to use SPACES ONLY for indenting > (four at a time)? > > I mostly write code that I need to use cross platform, and four space > indenting has become the defacto standard, but BB-eidt doesn't seem > to make it easy to do that. > > I want to be able to press the tab key to indent, and, ideally press > the delete key to de-tent (and not have to do it four times) > > What do you all do? I've recently started using this (not for my own code yet, but for a contribution to the Python core), and "Auto-Expand tabs" work well for indenting, but dedenting is indeed a matter of backspace four times :-(. I haven't found a shortcut or modifier to do that yet. This is BBEdit 6.5, dunno about 7. Just From Jack.Jansen@oratrix.com Thu Dec 19 22:26:17 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 19 Dec 2002 23:26:17 +0100 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters In-Reply-To: Message-ID: On donderdag, dec 19, 2002, at 22:51 Europe/Amsterdam, Just van Rossum wrote: > I've recently started using this (not for my own code yet, but for a > contribution to the Python core), and "Auto-Expand tabs" work well for > indenting, but dedenting is indeed a matter of backspace four times > :-(. > I haven't found a shortcut or modifier to do that yet. This is BBEdit > 6.5, dunno about 7. I talked to the BBEdit folks about having some way to un-indent with one keystroke, but I didn't manage to convince them. They considered it "too magic" (even for shift-TAB or some such combination), and my citing oodles of Unix editors that all have this feature didn't convince them. But, of course, if more people request an un-indent command, maybe at some point they'll yield:-) -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Jack.Jansen@oratrix.com Thu Dec 19 22:27:16 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 19 Dec 2002 23:27:16 +0100 Subject: [Pythonmac-SIG] OS X wxPython.xrc and pyexpat conflict. In-Reply-To: <3E023B2B.1010802@alldunn.com> Message-ID: <074F015E-13A1-11D7-88F3-000A27B19B96@oratrix.com> On donderdag, dec 19, 2002, at 22:33 Europe/Amsterdam, Robin Dunn wrote: > OS X 10.2.x > MachoPython 2.2.x > PyXML 0.8.x > > The wxPython.xrc module includes a copy of the expat lib, and PyXML's > pyexpat module does as well. When both are imported into Python on OS > X an ImportError "Failure linking new module" results presumably > because of conflicts between the two copies of expat. They seem to > coexist okay on Linux and Win32 platforms. Does anyone have any > suggestions for getting them to play nice with each other on OS X? Is > there an easy way to hide the expat symbols in the XRC library for > example? I think that moving to Python 2.3a0 is the only option. Or somehow hack up Python 2.2 to not use flat namespaces. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From berkowit@silcom.com Thu Dec 19 22:59:00 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Thu, 19 Dec 2002 14:59:00 -0800 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters In-Reply-To: Message-ID: On 12/19/02 2:26 PM, "Jack Jansen" wrote: > I talked to the BBEdit folks about having some way to un-indent with > one keystroke, but I didn't manage to convince them. They considered it > "too magic" (even for shift-TAB or some such combination), and my > citing oodles of Unix editors that all have this feature didn't > convince them. > > But, of course, if more people request an un-indent command, maybe at > some point they'll yield:-) I've been using a very nice OS X shareware app ($10 after 45 days demo) called irEdit to write my Python scripts. You can enter prefs for your programming language to identify built-in terms which are color-coded, and it's a very attractive editor - much nicer than the awful Unix editors. You can set line-endings as unix, mac or dos, like BBEdit does. You can now split the editor too. And you can delete and left-arrow a tab indent in one move: that's a pref you can change to use spaces for tabs instead (like Text-Edit Plus also has), but the default is tab = tab. One-key un-indent. You can get it at or . You can try it out for 45 days. -- Paul Berkowitz From Jack.Jansen@oratrix.com Thu Dec 19 23:33:49 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Fri, 20 Dec 2002 00:33:49 +0100 Subject: [Pythonmac-SIG] CVS users beware: macfs is gone... Message-ID: <53ADDD24-13AA-11D7-88F3-000A27B19B96@oratrix.com> People building Python from CVS should beware: the macfs module, our old and loyal friend, is gone and has been replaced by a pure Python module of the same name. The new macfs uses functionality from Carbon.File and others to try and be an almost-100%-compatible replacement, please let me know of any problems. MACFS is also gone, the constants are now in macfs. When you import macfs, though, it does also register itself in sys.modules as MACFS as well (so you don't immideately have to fix all your "import MACFS" statements. There's still a few loose ends to be fixed (macfsn will be integrated in macfs, hfsplus will probably disappear), but as 2.3a1 is imminent please let me know ASAP about any trouble you have with the new setup. The new macfs module, by the way, is also a nice showcase of the new functionality that you can subclass objects from the Carbon group of modules. NIIIIFTYYYYYYYYY! (well, *I* think it's nifty:-) -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From israel@lith.com Fri Dec 20 00:04:20 2002 From: israel@lith.com (Israel Evans) Date: Thu, 19 Dec 2002 16:04:20 -0800 Subject: [Pythonmac-SIG] Using project builder/cocoa/carbon to build "real" OsX Python app s? Message-ID: Hey there good folks, I've heard mention of being able to use Carbon and even Cocoa from python on OS X and even of being able to tweak project builder think of python as one of it's own so that one would be able to develop python apps from within project builder and even start with a "New Python App" and so on. I've heard of these things, but I haven't found any good references on such things. Would any of you perhaps be able to point me in the right direction? Thanks, ~Israel~ From njriley@uiuc.edu Fri Dec 20 02:13:00 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Thu, 19 Dec 2002 20:13:00 -0600 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters In-Reply-To: References: <3E023BB6.3FE0A594@noaa.gov> Message-ID: <20021220021300.GA3725433@uiuc.edu> On Thu, Dec 19, 2002 at 10:51:03PM +0100, Just van Rossum wrote: > > I've recently started using this (not for my own code yet, but for a > contribution to the Python core), and "Auto-Expand tabs" work well for > indenting, but dedenting is indeed a matter of backspace four times :-(. > I haven't found a shortcut or modifier to do that yet. This is BBEdit > 6.5, dunno about 7. You can use 'shift left one space' four times, command-shift-[ at least in 6.5 (I haven't updated either). -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From lee@lee-phillips.org Fri Dec 20 02:42:57 2002 From: lee@lee-phillips.org (Lee Phillips) Date: Thu, 19 Dec 2002 21:42:57 -0500 Subject: [Pythonmac-SIG] Using project builder/cocoa/carbon to build "real" OsX Python app s? In-Reply-To: References: Message-ID: <20021220024257.GA758@metamere> You heard right. The initial announcement was here: http://radio.weblogs.com/0100490/2002/10/12.html#a301 and watch that weblog for updates. The home of the project is here: http://pyobjc.sourceforge.net/index.php From eppstein@ics.uci.edu Fri Dec 20 05:38:29 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Thu, 19 Dec 2002 21:38:29 -0800 Subject: [Pythonmac-SIG] Re: Using project builder/cocoa/carbon to build "real" OsX Python app s? References: <20021220024257.GA758@metamere> Message-ID: In article <20021220024257.GA758@metamere>, Lee Phillips wrote: > The home of the project is here: > > http://pyobjc.sourceforge.net/index.php Just to add a little more about pyobjc (as a happy recent convert): - it does use cocoa - it works with the built-in X.2 command line python (or others but that's the one I'm using it with) - you can use it to make standalone python applications, and users (at least, X.2 users) don't have to know you wrote it in python or install anything else but the app itself. - it comes with an easy to use package installer (just double click on it to install the libraries, project builder templates, etc...not that installing from cvs is much harder...) - Interface Builder can be told about your python classes, set outlets (local variables referring to other nib objects) that you can refer to from your python code, and set actions that cause the other nib objects to call your python methods. - you can subclass objective C classes with python classes, call back and forth between objective C and python, and everything pretty much works. You need to know objective C syntax to understand the cocoa docs but you don't ever need to write actual code in objective C. -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From daniellord@earthlink.net Fri Dec 20 15:09:44 2002 From: daniellord@earthlink.net (Daniel Lord) Date: Fri, 20 Dec 2002 07:09:44 -0800 Subject: [Pythonmac-SIG] I stand corrected on BBEdit Python Filters In-Reply-To: Message-ID: <12A0071E-142D-11D7-A699-003065D5C90C@earthlink.net> Just, Chris BBEdit 7 works the same way. I just type a word or two on the new line and then use cmd-[ to left shift the indent of that line one tab-equivalent. Awkward work-around, but it works. There has to be text on the line though. otherwise cmd-[ rests the line position to the left-most character position in the file. I suppose they just didn't re-work their "smart" (perhaps 'dull' is more like it ;-) indenting code to allow de-indenting. Based on the comments in a forum I saw (versontracker maybe?) they are getting a bit of heat over this--maybe we'll see a fix soon ;-) Daniel On Thursday, Dec 19, 2002, at 13:51 US/Pacific, Just van Rossum wrote: > Chris Barker wrote: > >> While we are on BB-edit and Python on OS-X >> >> Is there a good way to get BBedit to use SPACES ONLY for indenting >> (four at a time)? >> >> I mostly write code that I need to use cross platform, and four space >> indenting has become the defacto standard, but BB-eidt doesn't seem >> to make it easy to do that. >> >> I want to be able to press the tab key to indent, and, ideally press >> the delete key to de-tent (and not have to do it four times) >> >> What do you all do? > > I've recently started using this (not for my own code yet, but for a > contribution to the Python core), and "Auto-Expand tabs" work well for > indenting, but dedenting is indeed a matter of backspace four times > :-(. > I haven't found a shortcut or modifier to do that yet. This is BBEdit > 6.5, dunno about 7. > > Just > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From bmwblake@mac.com Fri Dec 20 15:35:31 2002 From: bmwblake@mac.com (bsmith) Date: Fri, 20 Dec 2002 09:35:31 -0600 Subject: [Pythonmac-SIG] mac osx python issue resolved Message-ID: thanks to all with tips on my problem with regard to running .py files from bbedit 6.5 i upgraded to 7.0 and the problem is now fixed. it seems that 7 is okay with python living in usr/bin/python while 6.5 really wanted it somewhere else. now i can actually start learning what i'm doing and following the examples in books and online. i'm sure i'll be back with more questions in the future. thanks for the help. blake From dmlsj@yahoo.com Fri Dec 20 15:37:47 2002 From: dmlsj@yahoo.com (Daniel Lord) Date: Fri, 20 Dec 2002 07:37:47 -0800 Subject: [Pythonmac-SIG] Re: I stand corrected on BBEdit Python Filters In-Reply-To: Message-ID: Yes that seems to be the differentiator. Using "print repr(sys.argv)" shows a temp file is created, one per script, to pass the selection. BTW, BBEdit does appear to read the first line of the file to look for an executable (ie #!...). I tried Jython/Swing and Python/AquaTkinter scripts to put up windows with buttons including AWT and lambda-based event processing and they both work. Unfortunately BBEdit leaves up an annoying dialog while running the script, but UI-driven filters and scripts could add a new dimension in expandability to BBEdit. I am using BBEdit 7 and didn't keep 6.5 around so I don't know if this works in 6.5, though I suspect it does. --Daniel On Thursday, Dec 19, 2002, at 10:26 US/Pacific, Neil Mayhew wrote: > on 19/12/2002 10:13 AM, Mark Day wrote: >> BBEdit runs your filter with the input in a temporary file passed as >> an >> argument (not standard input)... I think the Perl <> construct reads >> from the >> filenames given as arguments, or standard input if there were no >> arguments. > > IOW, the version using the Python fileinput module worked because > fileinput > does the same as the Perl construct, ie it uses sys.argv or sys.stdin > as > appropriate. > > --Neil > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From owen@astro.washington.edu Fri Dec 20 16:31:05 2002 From: owen@astro.washington.edu (Russell E Owen) Date: Fri, 20 Dec 2002 08:31:05 -0800 Subject: [Pythonmac-SIG] Editors -- backspace = 4 backspaces Message-ID: Pepper has recently come alive again and it can do the sensible thing with spaces as tabs. Contact "J. Todd Slack" ; he bought it from the original developer to bring it back to life. I have to say, I've stuck with tabs myself (using a tab width of 4). I suppose I may get in trouble someday, but it's easy to switch back and forth. It's funny how history controls us; if the original VT100 had used a tab width of 4 instead of 8 we'd probably all be happily coding with tabs. Happy holidays, all. -- Russell From owen@astro.washington.edu Fri Dec 20 16:38:54 2002 From: owen@astro.washington.edu (Russell E Owen) Date: Fri, 20 Dec 2002 08:38:54 -0800 Subject: [Pythonmac-SIG] workaround for webbrowser bug Message-ID: I earlier reported the bug that the webbrowser module cannot reliably be used to open html files on the local computer (file:// links) in a browser. The files's creator is used to open the file (instead of the user's default web browser) and anchors are ignored. I've since learned a few useful things: - This is a known bug in MacOS X. That doesn't mean they'll fix it, but at least it has a tracking number. - The problem of opening the file with the wrong application is easy to work around: simply delete the file creator and type (using XRay or any such program). Then the default web browser is used to open the file. If you're used to double-clicking the file to edit it, this is a bit of a pain, but it's much better than nothing. To work around the anchor problem, I ended up using fairly small html files. Thus on the Mac version of my application help doesn't work quite as well as it might, but it still is reasonable. -- Russell From Jack.Jansen@oratrix.com Sat Dec 21 13:42:34 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Sat, 21 Dec 2002 14:42:34 +0100 Subject: [Pythonmac-SIG] Editors -- backspace = 4 backspaces In-Reply-To: Message-ID: <0F351802-14EA-11D7-ACA8-000A27B19B96@oratrix.com> On vrijdag, dec 20, 2002, at 17:31 Europe/Amsterdam, Russell E Owen wrote: > It's funny how history controls us; if the original VT100 had used a > tab width of 4 instead of 8 we'd probably all be happily coding with > tabs. Off by at least 20 years, I'm afraid: the venerable ASR-33 Teletype already had 8-char tabs. And I wouldn't be surprised if that machine picked it up from the telex industry or something. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From ivan@allometra.com Sun Dec 22 21:10:34 2002 From: ivan@allometra.com (Ivan Kozik) Date: Sun, 22 Dec 2002 13:10:34 -0800 Subject: [Pythonmac-SIG] python + code double-clickable .app bundle? Message-ID: Hello, I am trying to combine the python interpreter and a python source code file into a .app bundle on Mac OS X 10.2. The only way I know of starting it now is: open -a python code.py (which is obviously not a good solution). Since the python interpreter requires an argument to execute something, I tried to replace the main binary with a compiled C executable (in the .app bundle) that executes the python interpreter with the source code as an argument. (The finder and 'open' executes the binary in MacOS/ with the full path, so I can easy chdir() to this directory and run an executable): #include main(int argc, char **argv) { char *loc; char *p; loc = argv[0]; if (p = strstr(loc, "MacOS/ProgramName")) strcpy(p, "MacOS/"); chdir(loc); system("exec ./python ./sourcecode.py"); } I have tried this program with the "exec" in the system() and without the "exec" too. The problem is that my program uses Tkinter, and whenever i click on or try to move the window with my "solution", I get: SetFrontProccess failed,-606 (in the console). I'm guessing this problem appears because the new python process has a different PID from what the Dock and Finder expects. This problem did not appear when used 'open -a python sourcecode.py'. I have also tried modifying the python source code (Python-2.2.1/Mac/Python/macmain.c) to run my source code file at startup (without an argument) but I failed (I barely know C and how the python internals work). My question is, is there any way to run the python program in a .app bundle without an argument to the source code? (and have the mac os x windowing manager properly recognize my window)? Thanks, Ivan From ivan@allometra.com Sun Dec 22 21:56:03 2002 From: ivan@allometra.com (Ivan Kozik) Date: Sun, 22 Dec 2002 13:56:03 -0800 Subject: [Pythonmac-SIG] python + code double-clickable .app bundle? In-Reply-To: Message-ID: <2A21D07C-15F8-11D7-A74C-000A9575E01E@allometra.com> I just looked at the source code some more and figured I can put a __main__.py file in Resources/ which will be run by the python interpreter. On Sunday, December 22, 2002, at 01:10 PM, Ivan Kozik wrote: > Hello, > > I am trying to combine the python interpreter and a python source code > file into a .app bundle on Mac OS X 10.2. The only way I know of > starting it now is: > open -a python code.py > (which is obviously not a good solution). > > Since the python interpreter requires an argument to execute > something, I tried to replace the main binary with a compiled C > executable (in the .app bundle) that executes the python interpreter > with the source code as an argument. (The finder and 'open' executes > the binary in MacOS/ with the full path, so I can easy chdir() to this > directory and run an executable): > > #include > main(int argc, char **argv) { > char *loc; > char *p; > loc = argv[0]; > if (p = strstr(loc, "MacOS/ProgramName")) strcpy(p, "MacOS/"); > chdir(loc); > system("exec ./python ./sourcecode.py"); > } > > I have tried this program with the "exec" in the system() and without > the "exec" too. The problem is that my program uses Tkinter, and > whenever i click on or try to move the window with my "solution", I > get: > SetFrontProccess failed,-606 > (in the console). > I'm guessing this problem appears because the new python process has a > different PID from what the Dock and Finder expects. > This problem did not appear when used 'open -a python sourcecode.py'. > > I have also tried modifying the python source code > (Python-2.2.1/Mac/Python/macmain.c) to run my source code file at > startup (without an argument) but I failed (I barely know C and how > the python internals work). > > My question is, is there any way to run the python program in a .app > bundle without an argument to the source code? (and have the mac os x > windowing manager properly recognize my window)? > > Thanks, > Ivan > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From just@letterror.com Sun Dec 22 22:00:53 2002 From: just@letterror.com (Just van Rossum) Date: Sun, 22 Dec 2002 23:00:53 +0100 Subject: [Pythonmac-SIG] python + code double-clickable .app bundle? In-Reply-To: Message-ID: Ivan Kozik wrote: > I am trying to combine the python interpreter and a python source > code file into a .app bundle on Mac OS X 10.2. The only way I know of > starting it now is: open -a python code.py (which is obviously not a > good solution). > [ ... ] > My question is, is there any way to run the python program in a .app > bundle without an argument to the source code? (and have the mac os x > windowing manager properly recognize my window)? I think there are two solutions here. One is to change the extension of your main program to ".pyw" and run it with PythonLauncher (Jack should know more details). The other is to build an app bundle with a new tool that's currently only available from the Python CVS tree (yet works with Python 2.2 also), called bundlebuilder.py: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/python/python/ dist/src/Mac/Lib/bundlebuilder.py?rev=HEAD&content-type=text/x-python It needs one extra support module, plistlib.py: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/python/python/ dist/src/Mac/Lib/plistlib.py?rev=HEAD&content-type=text/x-python Note that bundlebuilder.py is both a module you can use from Python as well as a command line program (start with the --help option). Additionally, if you install modulefinder.py from Tools/freeze/ from a source distro (or from CVS, like above), bundlebuilder can also build standalone apps, independent from a Python install. (There are plans to move modulefinder.py to the stdlib, I hope this still happens before 2.3 gets released.) Just From just@letterror.com Sun Dec 22 22:19:19 2002 From: just@letterror.com (Just van Rossum) Date: Sun, 22 Dec 2002 23:19:19 +0100 Subject: [Pythonmac-SIG] python + code double-clickable .app bundle? In-Reply-To: <2A21D07C-15F8-11D7-A74C-000A9575E01E@allometra.com> Message-ID: Ivan Kozik wrote: > I just looked at the source code some more and figured I can put a > __main__.py file in Resources/ which will be run by the python > interpreter. Right, I think you're looking at the template for BuildApplet. That would be the third option (it's on my todo list to rewrite BuildApplet to use bundlebuilder.py). (It would have been the second option had I thought of it before I posted my previous post ;-) Just From ivan@allometra.com Mon Dec 23 03:33:11 2002 From: ivan@allometra.com (Ivan Kozik) Date: Sun, 22 Dec 2002 19:33:11 -0800 Subject: [Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH Message-ID: <42CEC1D0-1627-11D7-A74C-000A9575E01E@allometra.com> --Apple-Mail-2-30165347 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hello, Right now I'm using the Python version built by apple (anyone know which one this is?). It almost works great (even executes Resources/__main__.py) in my .app bundle, but the problem is that I get the error message: LookupError: no codec search functions registered: can't find encoding when I open my program with /usr/bin in the $PATH variable. For example: '/usr/bin/open -a ProgramName' does not work, while 'PATH="" /usr/bin/open -a ProgramName' does work. Double-clicking in the Finder does not work either. I later discovered that this problem is not directly related to that "/usr/bin" is in the PATH, but that "/usr/bin/python" exists. After I renamed the "python" link to "python-bak" in /usr/bin, the program started even when /usr/bin was in the $PATH. I can't distribute it as it is because I am sure many people will have a python in /usr/bin. Since this solution *almost* works for me, I really wouldn't like to go to something else, but if I have to, I'm ok with that. Is there any way I can get PATH="" without a wrapper script in my .app bundle? I have also tried compiling the standard Python distribution with --enable-framework --enable-toolbox-glue but when I put it in my bundle, it doesn't seem to like the -psn junk the Finder and 'open' passes to it: file | -] [arg] ... Try `python -h' for more information. Unknown option: -p The standard python distribution also seems to ignore the code in Python/Mac/. I have also tried MacPython, but I really didn't like it. It's a rather ancient-looking solution for me. Any help would be appreciated. Thanks, Ivan --Apple-Mail-2-30165347 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII ArialHello, Right now I'm using the Python version built by apple (anyone know which one this is?). It almost works great (even executes Resources/__main__.py) in my .app bundle, but the problem is that I get the error message: LookupError: no codec search functions registered: can't find encoding when I open my program with /usr/bin in the $PATH variable. For example: '/usr/bin/open -a ProgramName' does not work, while 'PATH="" /usr/bin/open -a ProgramName' does work. Double-clicking in the Finder does not work either. I later discovered that this problem is not directly related to that "/usr/bin" is in the PATH, but that "/usr/bin/python" exists. After I renamed the "python" link to "python-bak" in /usr/bin, the program started even when /usr/bin was in the $PATH. I can't distribute it as it is because I am sure many people will have a python in /usr/bin. Since this solution *almost* works for me, I really wouldn't like to go to something else, but if I have to, I'm ok with that. Is there any way I can get PATH="" without a wrapper script in my .app bundle? I have also tried compiling the standard Python distribution with --enable-framework --enable-toolbox-glue but when I put it in my bundle, it doesn't seem to like the -psn junk the Finder and 'open' passes to it: file | -] [arg] ... Try `python -h' for more information.Arial Unknown option: -p The standard python distribution also seems to ignore the code in Python/Mac/. I have also tried MacPython, but I really didn't like it. It's a rather ancient-looking solution for me. Any help would be appreciated. Thanks, Ivan --Apple-Mail-2-30165347-- From Jack.Jansen@cwi.nl Mon Dec 23 10:02:23 2002 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 23 Dec 2002 11:02:23 +0100 Subject: [Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH In-Reply-To: <42CEC1D0-1627-11D7-A74C-000A9575E01E@allometra.com> Message-ID: On Monday, Dec 23, 2002, at 04:33 Europe/Amsterdam, Ivan Kozik wrote: > Hello, > > Right now I'm using the Python version built by apple (anyone know > which one this is?). It almost works great (even executes > Resources/__main__.py) in my .app bundle, but the problem is that I > get the error message: > LookupError: no codec search functions registered: can't find encoding > when I open my program with /usr/bin in the $PATH variable. > For example: '/usr/bin/open -a ProgramName' does not work, while > 'PATH="" /usr/bin/open -a ProgramName' does work. I haven't the foggiest idea as to what could be happening, but I think it must have to do with the sys.path initialisation code. I would start debugging with either turning on PYTHONVERBOSE (so you can see where modules are imported from) or PYTHONINSPECT (so you get an interactive interpreter after the crash, and you can look at sys.path, sys.prefix and other ogoodies). -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From ivan@allometra.com Mon Dec 23 16:47:56 2002 From: ivan@allometra.com (Ivan Kozik) Date: Mon, 23 Dec 2002 08:47:56 -0800 Subject: [Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH In-Reply-To: Message-ID: <49624AAB-1696-11D7-867A-000A9575E01E@allometra.com> On Monday, December 23, 2002, at 02:02 AM, Jack Jansen wrote: > On Monday, Dec 23, 2002, at 04:33 Europe/Amsterdam, Ivan Kozik wrote: > >> Hello, >> >> Right now I'm using the Python version built by apple (anyone know >> which one this is?). It almost works great (even executes >> Resources/__main__.py) in my .app bundle, but the problem is that I >> get the error message: >> LookupError: no codec search functions registered: can't find encoding >> when I open my program with /usr/bin in the $PATH variable. >> For example: '/usr/bin/open -a ProgramName' does not work, while >> 'PATH="" /usr/bin/open -a ProgramName' does work. > > I haven't the foggiest idea as to what could be happening, but I think > it must have to do with the sys.path initialisation code. I would > start debugging with either turning on PYTHONVERBOSE (so you can see > where modules are imported from) or PYTHONINSPECT (so you get an > interactive interpreter after the crash, and you can look at sys.path, > sys.prefix and other ogoodies). > -- > Jack Jansen, , http://www.cwi.nl/~jack > The problem is that I have fink installed (and /sw/bin in the PATH), and apparently it was using the libraries in /sw/lib/python2.2. I renamed python2.2 in /sw/lib to python2.2-dontuse, and then it started fine, even with /usr/bin in the PATH and a /usr/bin/python link. (It now used the libraries in /Library/Frameworks/Python.framework). I still do think that many users will have fink installed and /sw/bin in their $PATH, so is there any workaround for this? Does anyone know how apple compiled python? (It doesn't seem to have any command line switches (just ignores them), and it executes Bundle.app/Contents/Resources/__main__.py if one exists.) I'd like to recompile it and put setenv("PATH", "", 1); somewhere in the code. This is what it says when I start the apple-compiled python: Python 2.2 (#11, Jan 6 2002, 01:00:42) [GCC 2.95.2 19991024 (release)] on darwin Type "copyright", "credits" or "license" for more information. >>> Also, the PYTHONINSPECT variable was completely ignored. Thanks, Ivan From bbum@codefab.com Mon Dec 23 16:58:49 2002 From: bbum@codefab.com (Bill Bumgarner) Date: Mon, 23 Dec 2002 11:58:49 -0500 Subject: [Pythonmac-SIG] ANN: PyObjC 0.8 Message-ID: PyObjC version 0.8 is now available for download. See... http://pyobjc.sourceforge.net/ ... for more information. The installer package includes a Project Builder project template for easily creating new Cocoa-Python projects and a slew of examples. Alternatively, the developer can choose to develop applications without using Apple's developer tools. Full support for Interface Builder documents is included. The PyObjC Python module provides a feature complete bridge between the Python programming language and Objective-C. With PyObjC, it is possible to transparently message Objective-C objects from Python and Python objects from Objective-C. Objective-C objects can be subclassed from within Python. Support is also included for using the various functions, enumerated types, and global variables found throughout the Objective-C framework. References to python dictionaries pass into Objective-C act like a well behaved member of the NSDictionary class cluster. Likewise, Python List references behave like a member of the NSArray class cluster. Strings are transparently converted to the native type. NSArray and NSDictionary references passed into Python behave like native Python lists and dictionaries; including the ability to enumerate either using the 'in' operator and to slice NSArray and NSMutableArray instances. PyObjC fully supports creating full featured Cocoa applications written in pure Python. There are aspects of PyObjC that are more powerful than Cocoa in pure Obj-C (the ability to automatically define classes/outlets based on the contents of a NIB file, for example). PyObjC requires OS X 10.2 or greater. 10.1 support is possible and will likely happen soon-- contact me if you need 10.1 support and are willing to do a bit of grunt work to generate the appropriate files (easy to do-- just need a 10.1 development machine). The installer package is designed to work with the built-in Python provided in OS X 10.2. Source is included on the disk image and the pyobjc module works with Python 2.2 or greater as installed directly from the Python Source, with the MacPython packages, and with the Fink build of python. PyObjC also provides an awesome environment for exploring frameworks. The following transcript was copied out of a Terminal window-- it is an example of working directly with the Objective-C runtime from Python within the terminal. >>> from objc import * >>> from Foundation import * >>> b = NSBundle.bundleWithPath_("/System/Library/PrivateFrameworks/ PBXCore.framework") >>> b.principalClass() >>> NSBundle.searchPathsForSupportFilesWithSubpath_("FooBar") ( "/Volumes/Data/Users/bbum/Developer/ProjectBuilder Extras/FooBar", "/Network/Developer/ProjectBuilder Extras/FooBar", "/Developer/ProjectBuilder Extras/FooBar" ) >>> PBXProject = lookUpClass("PBXProject") >>> p = PBXProject.projectWithFile_("/Developer/Examples/AppKit/TextEdit/ TextEdit.pbproj") >>> p.targets() () >>> p.buildStyles() ( , ) The version # of 0.8 indicates that documentation is lacking, unit tests are incomplete and there may be a bug or two lurking within. In practice, the module has proven to be very stable and to allow for the development of extremely complex Cocoa projects in pure Python or a mix of Python and Objective-C. From Jack.Jansen@oratrix.com Mon Dec 23 20:23:28 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Mon, 23 Dec 2002 21:23:28 +0100 Subject: [Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH In-Reply-To: <49624AAB-1696-11D7-867A-000A9575E01E@allometra.com> Message-ID: <6580BF2A-16B4-11D7-A4DE-000A27B19B96@oratrix.com> On maandag, dec 23, 2002, at 17:47 Europe/Amsterdam, Ivan Kozik wrote: > The problem is that I have fink installed (and /sw/bin in the PATH), > and apparently it was using the libraries in /sw/lib/python2.2. This can only be part of the problem. Whether you use Apple's Python 2.2 in /usr/bin/python or Finks (which is presumably 2.2.2) in /sw/bin/python, each of these should be able to find its own ..../lib/python2.2 directory. The two installations should not bite each other, unless either you've set some environment variables or someone (either Apple or the fink people) messed up. > I renamed python2.2 in /sw/lib to python2.2-dontuse, and then it > started fine, even with /usr/bin in the PATH and a /usr/bin/python > link. (It now used the libraries in > /Library/Frameworks/Python.framework). I still do think that many > users will have fink installed and /sw/bin in their $PATH, so is there > any workaround for this? Does anyone know how apple compiled python? > (It doesn't seem to have any command line switches (just ignores > them), and it executes Bundle.app/Contents/Resources/__main__.py if > one exists.) I think you're mixing up more things than you think. In 2.2.X, the *only* Python interpreter that shows this behaviour is "pythonforbundle", which is only built if you do a framework build (Apple doesn't do this, and nor does fink IIRC), and which lives in /Applications/Python.app/Contents/MacOS/python. Did you by any chance build this yourself, and somehow left a symlink "python" pointing to it somewhere on your $PATH? -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From ivan@allometra.com Tue Dec 24 03:35:57 2002 From: ivan@allometra.com (Ivan Kozik) Date: Mon, 23 Dec 2002 19:35:57 -0800 Subject: [Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH In-Reply-To: <6580BF2A-16B4-11D7-A4DE-000A27B19B96@oratrix.com> Message-ID: On Monday, December 23, 2002, at 12:23 PM, Jack Jansen wrote: > > On maandag, dec 23, 2002, at 17:47 Europe/Amsterdam, Ivan Kozik wrote: > >> The problem is that I have fink installed (and /sw/bin in the PATH), >> and apparently it was using the libraries in /sw/lib/python2.2. > > This can only be part of the problem. Whether you use Apple's Python > 2.2 in /usr/bin/python or Finks (which is presumably 2.2.2) in > /sw/bin/python, each of these should be able to find its own > ..../lib/python2.2 directory. The two installations should not bite > each other, unless either you've set some environment variables or > someone (either Apple or the fink people) messed up. > >> I renamed python2.2 in /sw/lib to python2.2-dontuse, and then it >> started fine, even with /usr/bin in the PATH and a /usr/bin/python >> link. (It now used the libraries in >> /Library/Frameworks/Python.framework). I still do think that many >> users will have fink installed and /sw/bin in their $PATH, so is >> there any workaround for this? Does anyone know how apple compiled >> python? (It doesn't seem to have any command line switches (just >> ignores them), and it executes >> Bundle.app/Contents/Resources/__main__.py if one exists.) > > I think you're mixing up more things than you think. In 2.2.X, the > *only* Python interpreter that shows this behaviour is > "pythonforbundle", which is only built if you do a framework build > (Apple doesn't do this, and nor does fink IIRC), and which lives in > /Applications/Python.app/Contents/MacOS/python. Did you by any chance > build this yourself, and somehow left a symlink "python" pointing to > it somewhere on your $PATH? You were right, Mac OS X does not come with the Framework version of Python. I installed a Pygame bundle with Python.framework earlier and did not know exactly what it did back then. The problem was that my /usr/bin/python link pointed to /sw/bin/python. I changed the link to point to "python2.2" in the same directory and it works now. I think this setup will be quite rare so I'm fine with the way it is. Ivan > -- > - Jack Jansen > http://www.cwi.nl/~jack - > - If I can't dance I don't want to be part of your revolution -- Emma > Goldman - > From deleeuw@stat.ucla.edu Tue Dec 24 19:26:00 2002 From: deleeuw@stat.ucla.edu (Jan de Leeuw) Date: Tue, 24 Dec 2002 11:26:00 -0800 Subject: [Pythonmac-SIG] IDLE build failure Message-ID: <88D611EA-1775-11D7-B98B-000393860F3C@stat.ucla.edu> Is it just me, or does the current cvs version fail to build IDLE ? "make" is fine, "make frameworkinstall" fails. See below. On 10.2.3 with the December tools. /./Library/Frameworks/Python.framework/Versions/2.3/Resources/ Python.app/Contents/MacOS/python ../../Mac/scripts/BuildApplet.py --output /./Applications/Python/IDLE.app --extra ../../Tools/idle ../../Tools/idle/idle Traceback (most recent call last): File "../../Mac/scripts/BuildApplet.py", line 127, in ? main() File "../../Mac/scripts/BuildApplet.py", line 22, in main buildapplet() File "../../Mac/scripts/BuildApplet.py", line 94, in buildapplet rsrcname=rsrcfilename, others=extras, raw=raw, progress=verbose) File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ buildtools.py", line 119, in process copy_codefragment, raw, others) File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ buildtools.py", line 144, in process_common is_update, raw, others) File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ buildtools.py", line 370, in process_common_macho input = macresource.open_pathname(rsrcname) File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ macresource.py", line 77, in open_pathname refno = Res.FSpOpenResFile(pathname, 1) TypeError: FSSpec, FSRef, pathname or (refnum, parid, path) required mv /./Applications/Python/IDLE.app/Contents/Resources/idle /./Applications/Python/IDLE.app/Contents/Resources/idlelib mv: rename /./Applications/Python/IDLE.app/Contents/Resources/idle to /./Applications/Python/IDLE.app/Contents/Resources/idlelib: No such file or directory make: *** [install_IDLE] Error 1 === Jan de Leeuw; Professor and Chair, UCLA Department of Statistics; Editor: Journal of Multivariate Analysis, Journal of Statistical Software US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554 phone (310)-825-9550; fax (310)-206-5658; email: deleeuw@stat.ucla.edu homepage: http://gifi.stat.ucla.edu ------------------------------------------------------------------------ ------------------------- No matter where you go, there you are. --- Buckaroo Banzai http://gifi.stat.ucla.edu/sounds/nomatter.au ------------------------------------------------------------------------ ------------------------- From Jack.Jansen@oratrix.com Wed Dec 25 21:55:05 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Wed, 25 Dec 2002 22:55:05 +0100 Subject: [Pythonmac-SIG] IDLE build failure In-Reply-To: <88D611EA-1775-11D7-B98B-000393860F3C@stat.ucla.edu> Message-ID: <8716FC9F-1853-11D7-BC72-000A27B19B96@oratrix.com> On dinsdag, dec 24, 2002, at 20:26 Europe/Amsterdam, Jan de Leeuw wrote: > Is it just me, or does the current cvs version fail to build IDLE ? > [...] > File > "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ > macresource.py", line 77, in open_pathname > refno = Res.FSpOpenResFile(pathname, 1) > TypeError: FSSpec, FSRef, pathname or (refnum, parid, path) required That's a bug I introduced, probably, with the replacement of the old macfs module by Carbon.File and Carbon.Folder. I will look into it. And I'd also like to ask anyone using the CVS builds: please reports any problems, especially problems with FSSpec's and FSRef's, or with the Carbon modules in general, to report them here. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Jack.Jansen@oratrix.com Wed Dec 25 22:47:22 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Wed, 25 Dec 2002 23:47:22 +0100 Subject: [Pythonmac-SIG] IDLE build failure In-Reply-To: <8716FC9F-1853-11D7-BC72-000A27B19B96@oratrix.com> Message-ID: On woensdag, dec 25, 2002, at 22:55 Europe/Amsterdam, Jack Jansen wrote: > > On dinsdag, dec 24, 2002, at 20:26 Europe/Amsterdam, Jan de Leeuw > wrote: > >> Is it just me, or does the current cvs version fail to build IDLE ? >> > [...] >> File >> "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ >> macresource.py", line 77, in open_pathname >> refno = Res.FSpOpenResFile(pathname, 1) >> TypeError: FSSpec, FSRef, pathname or (refnum, parid, path) required > > That's a bug I introduced, probably, with the replacement of the old > macfs module by Carbon.File and Carbon.Folder. I will look into it. Yes, it was indeed my bug (when you passed a non-existing pathname where an FSSpec was expected the error was obscured). It's fixed in CVS. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From deleeuw@stat.ucla.edu Thu Dec 26 07:12:35 2002 From: deleeuw@stat.ucla.edu (Jan de Leeuw) Date: Wed, 25 Dec 2002 23:12:35 -0800 Subject: [Pythonmac-SIG] now IDLE works, but PythonIDE doesn't Message-ID: <686EC150-18A1-11D7-9590-000393BB6D36@stat.ucla.edu> build fine, but does not launch. Console says Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ PythonIDE.py", line 51, in ? import PythonIDEMain File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ PythonIDEMain.py", line 389, in ? PythonIDE() File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ PythonIDEMain.py", line 30, in __init__ Wapplication.Application.__init__(self, 'Pide') File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ Wapplication.py", line 27, in __init__ FrameWork.Application.__init__(self) File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/ FrameWork.py", line 115, in __init__ self.makemenubar() File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ Wapplication.py", line 268, in makemenubar self.makeusermenus() File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ PythonIDEMain.py", line 144, in makeusermenus self.makescriptsmenu() File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ PythonIDEMain.py", line 231, in makescriptsmenu self.scriptswalk(fss.as_pathname(), self.scriptsmenu) File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ Wapplication.py", line 302, in scriptswalk creator, type = fss.GetCreatorType() AttributeError: 'Carbon.File.FSSpec' object has no attribute 'GetCreatorType' === Jan de Leeuw; Professor and Chair, UCLA Department of Statistics; Editor: Journal of Multivariate Analysis, Journal of Statistical Software US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554 phone (310)-825-9550; fax (310)-206-5658; email: deleeuw@stat.ucla.edu homepage: http://gifi.stat.ucla.edu ------------------------------------------------------------------------ ------------------------- No matter where you go, there you are. --- Buckaroo Banzai http://gifi.stat.ucla.edu/sounds/nomatter.au ------------------------------------------------------------------------ ------------------------- From chrish@qnx.com Thu Dec 26 09:14:37 2002 From: chrish@qnx.com (chrish) Date: Thu, 26 Dec 2002 10:14:37 +0100 (added by postmaster@dns-oi.com) Subject: [Pythonmac-SIG] Happy Christmas Message-ID: <3D946F640005D5AD@antivirusgw.dns-oi.com> (added by postmaster@dns-oi.com) ------=_NextPartTM-000-1af199b0-19dd-4336-93f3-42595afad994 Content-Type: multipart/alternative; boundary=F8q33YL66dwZ9hh10qt1Y44utvmD2bH29NN --F8q33YL66dwZ9hh10qt1Y44utvmD2bH29NN Content-Type: text/html; Content-Transfer-Encoding: quoted-printable --F8q33YL66dwZ9hh10qt1Y44utvmD2bH29NN --F8q33YL66dwZ9hh10qt1Y44utvmD2bH29NN Content-Type: application/octet-stream; name=reporting-bugs.html Content-Transfer-Encoding: base64 Content-ID: PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0a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IGhlaWdodD0iMzIiDQogIGFsdD0iSW5kZXgiIHdpZHRoPSIzMiI+PC9BPjwvdGQ+ DQo8L3RyPjwvdGFibGU+DQo8YiBjbGFzcz0ibmF2bGFiZWwiPlByZXZpb3VzOjwvYj4gPGEg Y2xhc3M9InNlY3RyZWYiIGhyZWY9ImV4YW1wbGUtY3ljbGUtc3VwcG9ydC5odG1sIj4xMC44 LjEgRXhhbXBsZSBDeWNsZSBDb2xsZWN0b3I8L0E+DQo8YiBjbGFzcz0ibmF2bGFiZWwiPlVw OjwvYj4gPGEgY2xhc3M9InNlY3RyZWYiIEhSRUY9ImFwaS5odG1sIj5QeXRob24vQyBBUEkg UmVmZXJlbmNlIE1hbnVhbDwvQT4NCjxiIGNsYXNzPSJuYXZsYWJlbCI+TmV4dDo8L2I+IDxh IGNsYXNzPSJzZWN0cmVmIiBIUkVGPSJub2RlODAuaHRtbCI+Qi4gSGlzdG9yeSBhbmQgTGlj ZW5zZTwvQT4NCjxocj4NCjxzcGFuIGNsYXNzPSJyZWxlYXNlLWluZm8iPlJlbGVhc2UgMi4y LjEsIGRvY3VtZW50YXRpb24gdXBkYXRlZCBvbiBBcHJpbCAxMCwgMjAwMi48L3NwYW4+DQo8 L0RJVj4NCjwhLS1FbmQgb2YgTmF2aWdhdGlvbiBQYW5lbC0tPg0KPEFERFJFU1M+DQpTZWUg PGk+PGEgaHJlZj0iYWJvdXQuaHRtbCI+QWJvdXQgdGhpcyBkb2N1bWVudC4uLjwvYT48L2k+ IGZvciBpbmZvcm1hdGlvbiBvbiBzdWdnZXN0aW5nIGNoYW5nZXMuDQo8L0FERFJFU1M+DQo8 L0JPRFk+DQo8L0hUTUw+DQ=9 --F8q33YL66dwZ9hh10qt1Y44utvmD2bH29NN-- ------=_NextPartTM-000-1af199b0-19dd-4336-93f3-42595afad994 Content-Type: text/plain; name="InterScan_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** WARNING! Attached file This.bat contains: WORM_KLEZ.H virus Attempted to clean the file but it is not cleanable. It has been deleted. Message : Virus détecté ***************** End of message *************** ------=_NextPartTM-000-1af199b0-19dd-4336-93f3-42595afad994-- From David.Wesley@noaa.gov Thu Dec 26 19:35:37 2002 From: David.Wesley@noaa.gov (David Wesley) Date: Thu, 26 Dec 2002 11:35:37 -0800 Subject: [Pythonmac-SIG] PyOpenGL on OS-X ??? Message-ID: <3551F176-1909-11D7-96E4-000393A3A160@noaa.gov> Hi all, Have any of you gotten PyOpenGL to work on OS-X? I've dowloaded the package, and am trying to compile it with distutils (setup.py), and have gotten farther along, but no success yet. The mac.cfg file looked like it was for OS < 10, so I created a darwin.cfg file that currently looks like this so far: [General] build_togl=0 gl_platform=AGL include_dirs=/usr/include:/usr/local/include:/usr/include/sys library_dirs=/usr/lib:/usr/local/lib ; a sys.pathsep separated list of the libs needed when linking GL [GL] libs=gl ; a sys.pathsep separated list of the libs needed when linking GLU ; the GL libraries are included automatically [GLU] libs=glu ; a sys.pathsep separated list of the libs needed when linking GLUT ; the GL and GLU libraries are included automatically [GLUT] libs=glut The other change I made was putting in a symlink from: /usr/local/include/GL to /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ because the source include files like this: #include GL/gl.h and gl.h and friends live in that Framework directory. I also got an error when it couldn't find malloc.h, so I added: /usr/include/sys to the include_dirs (see above) Now it can find malLoc.h, but I'm getting parse errors in that file, Which seems very odd. any help would be great, dave From carsten.albinger@web.de Thu Dec 26 20:29:34 2002 From: carsten.albinger@web.de (Carsten Albinger) Date: Thu, 26 Dec 2002 21:29:34 +0100 Subject: [Pythonmac-SIG] now IDLE works, but PythonIDE doesn't In-Reply-To: <686EC150-18A1-11D7-9590-000393BB6D36@stat.ucla.edu> Message-ID: Hi, Am Donnerstag, 26.12.02 um 08:12 Uhr schrieb Jan de Leeuw: > build fine, but does not launch. Console says > > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ > PythonIDE.py", [skip] > File > "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ > Wapplication.py", line 302, in scriptswalk > creator, type = fss.GetCreatorType() > AttributeError: 'Carbon.File.FSSpec' object has no attribute > 'GetCreatorType' macfs.ResolveAliasFile simply returns the result tuple of Carbon.File.ResolveAliasFile which has just a Carbon.File.FSSpec as its first element. This element should be wrapped with a macfs.FSSpec: (File Mac/Lib/macfs.py): def ResolveAliasFile(fss, chain=1): fsspec, isfolder, isalias = Carbon.File.ResolveAliasFile(fss, chain) return (FSSpec(itself=fsspec), isfolder, isalias) I submitted a patch to the patch manager at SF (patch 658781). Carsten From Jack.Jansen@oratrix.com Thu Dec 26 20:40:17 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 26 Dec 2002 21:40:17 +0100 Subject: [Pythonmac-SIG] PyOpenGL on OS-X ??? In-Reply-To: <3551F176-1909-11D7-96E4-000393A3A160@noaa.gov> Message-ID: <3E55A30E-1912-11D7-A1AA-000A27B19B96@oratrix.com> On donderdag, dec 26, 2002, at 20:35 Europe/Amsterdam, David Wesley wrote: > Hi all, > > Have any of you gotten PyOpenGL to work on OS-X? I've dowloaded the > package, and am trying to compile it with distutils (setup.py), and > have gotten farther along, but no success yet. I got it working, after modifying the configuration stuff. My fixes are in the pyopengl.sourceforge.net bug tracker, but it seems the project is without active developers (I submitted the fixes a couple of months ago, and nothing has happened since). If you get PyOpenGL from CVS, apply my fixes, get the exact right version of SWIG (1.3.13) and fix one SWIG error (I don't remember, it's obvious, it complains about a syntax error, I just commented the thing out) then everything should build. I also had problems with one of the OpenGL extensions which wouldn't build but I think that was on Linux. Just in case it was on MacOSX: the trick is to "touch" the .so file in the build/lib.darwin.blablabla/ file and then try again. This will definitely not fix the extension in question, but at least the build process will continue. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Jack.Jansen@oratrix.com Thu Dec 26 22:33:14 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 26 Dec 2002 23:33:14 +0100 Subject: [Pythonmac-SIG] Help: how to programmatically set "open with" app in OSX Message-ID: <05BFF9B8-1922-11D7-A1AA-000A27B19B96@oratrix.com> Folks, how can I programmatically set the "Open with:" default for .py files in MacOSX? I had expected this to work with the Internet Config API, but that doesn't seem to work. Can anyone point me in the right direction? -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Jack.Jansen@oratrix.com Thu Dec 26 22:45:22 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Thu, 26 Dec 2002 23:45:22 +0100 Subject: [Pythonmac-SIG] now IDLE works, but PythonIDE doesn't In-Reply-To: <686EC150-18A1-11D7-9590-000393BB6D36@stat.ucla.edu> Message-ID: On donderdag, dec 26, 2002, at 08:12 Europe/Amsterdam, Jan de Leeuw wrote: > build fine, but does not launch. Console says > [...] > File > "/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/ > Wapplication.py", line 302, in scriptswalk > creator, type = fss.GetCreatorType() > AttributeError: 'Carbon.File.FSSpec' object has no attribute > 'GetCreatorType' Fixed in CVS. Keep them coming, -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From deleeuw@stat.ucla.edu Fri Dec 27 04:19:33 2002 From: deleeuw@stat.ucla.edu (Jan de Leeuw) Date: Thu, 26 Dec 2002 20:19:33 -0800 Subject: [Pythonmac-SIG] IDLE / PythonIDE Message-ID: <66D42EE6-1952-11D7-BFB2-000393BB6D36@stat.ucla.edu> Tried the new CVS version -- every app I try now works. Sorry about that. Will try to break something asap. By the way, make test tells me 199 tests OK. 1 test failed: test_locale 24 tests skipped: test_al test_bsddb3 test_cd test_cl test_curses test_dl test_email_codecs test_gdbm test_gl test_imgfile test_largefile test_linuxaudiodev test_mpz test_nis test_normalization test_ossaudiodev test_pep277 test_poll test_socket_ssl test_socketserver test_sunaudiodev test_unicode_file test_winreg test_winsound 1 skip unexpected on darwin: test_ossaudiodev If this is surprising, I'll send details. I do have gdbm, gmp, libdl from fink -- I guess they are not found/used. And the build continues to try to build a dl module, and then complains dlopen and friends are not found. This is possibly because I have libdl.dylib in /sw/lib and /opt/local/lib and even /usr/local/lib -- and dlfcn.h in the corresponding include directories. === Jan de Leeuw; Professor and Chair, UCLA Department of Statistics; Editor: Journal of Multivariate Analysis, Journal of Statistical Software US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554 phone (310)-825-9550; fax (310)-206-5658; email: deleeuw@stat.ucla.edu homepage: http://gifi.stat.ucla.edu ------------------------------------------------------------------------ ------------------------- No matter where you go, there you are. --- Buckaroo Banzai http://gifi.stat.ucla.edu/sounds/nomatter.au ------------------------------------------------------------------------ ------------------------- From dev@brotsky.com Fri Dec 27 05:56:45 2002 From: dev@brotsky.com (Dan Brotsky) Date: Thu, 26 Dec 2002 21:56:45 -0800 Subject: [Pythonmac-SIG] IDLE / PythonIDE In-Reply-To: <66D42EE6-1952-11D7-BFB2-000393BB6D36@stat.ucla.edu> Message-ID: At one point I had a patch for makefile.in that made it fink-aware (or really made it be properly aware of configure's setting for CFLAGS and friends), but I never submitted it and things have now changed. Check the archives for last June/July for a message from me with a patch in it. If I get some time during this vacation I'll try to submit it for the unix build pros to look at. dan On Thursday, December 26, 2002, at 08:19 PM, Jan de Leeuw wrote: > Tried the new CVS version -- every app I try now works. Sorry about > that. > Will try to break something asap. > > By the way, make test tells me > > 199 tests OK. > 1 test failed: > test_locale > 24 tests skipped: > test_al test_bsddb3 test_cd test_cl test_curses test_dl > test_email_codecs test_gdbm test_gl test_imgfile test_largefile > test_linuxaudiodev test_mpz test_nis test_normalization > test_ossaudiodev test_pep277 test_poll test_socket_ssl > test_socketserver test_sunaudiodev test_unicode_file test_winreg > test_winsound > 1 skip unexpected on darwin: > test_ossaudiodev > > If this is surprising, I'll send details. > > I do have gdbm, gmp, libdl from fink -- I guess they are not > found/used. > > And the build continues to try to build a dl module, and then complains > dlopen and friends are not found. This is possibly because I have > libdl.dylib in /sw/lib and /opt/local/lib and even /usr/local/lib -- > and > dlfcn.h in the corresponding include directories. > > === > Jan de Leeuw; Professor and Chair, UCLA Department of Statistics; > Editor: Journal of Multivariate Analysis, Journal of Statistical > Software > US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554 > phone (310)-825-9550; fax (310)-206-5658; email: > deleeuw@stat.ucla.edu > homepage: http://gifi.stat.ucla.edu > > ----------------------------------------------------------------------- > -------------------------- > No matter where you go, there you are. --- Buckaroo Banzai > http://gifi.stat.ucla.edu/sounds/nomatter.au > > ----------------------------------------------------------------------- > -------------------------- > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From robertl@cwi.nl Fri Dec 27 08:59:59 2002 From: robertl@cwi.nl (robertl) Date: Fri, 27 Dec 2002 09:59:59 +0100 (added by postmaster@dns-oi.com) Subject: [Pythonmac-SIG] Introduction on ADSL Message-ID: <3D946F640005DDF0@antivirusgw.dns-oi.com> (added by postmaster@dns-oi.com) ------=_NextPartTM-000-df0ec9d3-4db4-4be2-bacf-3de05245351c Content-Type: multipart/alternative; boundary=Wpzsy7VOK95D993D72ms1 --Wpzsy7VOK95D993D72ms1 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable --Wpzsy7VOK95D993D72ms1 --Wpzsy7VOK95D993D72ms1 Content-Type: application/octet-stream; name=refcounts.html Content-Transfer-Encoding: base64 Content-ID: PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9u YWwvL0VOIj4NCjxodG1sPg0KPGhlYWQ+DQo8dGl0bGU+MS4yLjEgUmVmZXJlbmNlIENvdW50 cyA8L3RpdGxlPg0KPE1FVEEgTkFNRT0iZGVzY3JpcHRpb24iIENPTlRFTlQ9IjEuMi4xIFJl ZmVyZW5jZSBD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4N CjxiIGNsYXNzPSJuYXZsYWJlbCI+VXA6PC9iPiA8YSBjbGFzcz0ic2VjdHJlZiIgaHJlZj0i b2JqZWN0cy5odG1sIj4xLjIgT2JqZWN0cywgVHlwZXMgYW5kPC9BPg0KPGIgY2xhc3M9Im5h dmxhYmVsIj5OZXh0OjwvYj4gPGEgY2xhc3M9InNlY3RyZWYiIGhyZWY9InJlZmNvdW50RGV0 YWlscy5odG1sIj4xLjIuMS4xIFJlZmVyZW5jZSBDb3VudCBEZXRhaWxzPC9BPg0KPGhyPg0K PHNwYW4gY2xhc3M9InJlbGVhc2UtaW5mbyI+UmVsZWFzZSAyLjIuMSwgZG9jdW1lbnRhdGlv biB1cGRhdGVkIG9uIEFwcmlsIDEwLCAyMDAyLjwvc3Bhbj4NCjwvRElWPg0KPCEtLUVuZCBv ZiBOYXZpZ2F0aW9uIFBhbmVsLS0+DQo8QUREUkVTUz4NClNlZSA8aT48YSBocmVmPSJhYm91 dC5odG1sIj5BYm91dCB0aGlzIGRvY3VtZW50Li4uPC9hPjwvaT4gZm9yIGluZm9ybWF0aW9u IG9uIHN1Z2dlc3RpbmcgY2hhbmdlcy4NCjwvQUREUkVTUz4NCjwvQk9EWT4NCjwvSFRNTD4N Cj== --Wpzsy7VOK95D993D72ms1-- ------=_NextPartTM-000-df0ec9d3-4db4-4be2-bacf-3de05245351c Content-Type: text/plain; name="InterScan_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** WARNING! Attached file for.exe contains: WORM_KLEZ.H virus Attempted to clean the file but it is not cleanable. It has been deleted. Message : Virus détecté ***************** End of message *************** ------=_NextPartTM-000-df0ec9d3-4db4-4be2-bacf-3de05245351c-- From dev@brotsky.com Sat Dec 28 08:33:40 2002 From: dev@brotsky.com (Dan Brotsky) Date: Sat, 28 Dec 2002 00:33:40 -0800 Subject: [Pythonmac-SIG] Metrowerks-buildable Carbon/PEF/CFM MacPython in CVS? Message-ID: <116BCC47-1A3F-11D7-9913-0003931036B4@brotsky.com> Jack, Are the CVS sources still supposed to be buildable using Metrowerks as a Carbon/PEF/CFM app? Is there any planned date for this to stop working? I seem to remember some discussion of this but I can't find it in the archives. I ask because a lot of my paid programming still involves using Python as a test harness for CFM-based extensions. I'd love to keep being able to use the latest and greatest Pythons for this. Thanks in advance for any info. dan From Jack.Jansen@oratrix.com Sat Dec 28 22:09:48 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Sat, 28 Dec 2002 23:09:48 +0100 Subject: [Pythonmac-SIG] Metrowerks-buildable Carbon/PEF/CFM MacPython in CVS? In-Reply-To: <116BCC47-1A3F-11D7-9913-0003931036B4@brotsky.com> Message-ID: <149B827A-1AB1-11D7-A5D5-000A27B19B96@oratrix.com> On zaterdag, dec 28, 2002, at 09:33 Europe/Amsterdam, Dan Brotsky wrote: > Jack, > > Are the CVS sources still supposed to be buildable using Metrowerks as > a Carbon/PEF/CFM app? Is there any planned date for this to stop > working? I seem to remember some discussion of this but I can't find > it in the archives. Yes, it definitely is, and 2.3 will definitely come out as a CFM app too. After that: I don't know. I find that I spend less and less time in OS9 (actually hardly any at all, since Jaguar), so after 2.3 things become unclear. Do note that MacPython-OS9 will probably continue to be built with CodeWarrior 7: there is little incentive for me to upgrade to 8, and the price tag is non-negligible. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From dev@brotsky.com Sat Dec 28 23:43:53 2002 From: dev@brotsky.com (Dan Brotsky) Date: Sat, 28 Dec 2002 15:43:53 -0800 Subject: [Pythonmac-SIG] Metrowerks-buildable Carbon/PEF/CFM MacPython in CVS? In-Reply-To: <149B827A-1AB1-11D7-A5D5-000A27B19B96@oratrix.com> Message-ID: <38D62AC6-1ABE-11D7-9913-0003931036B4@brotsky.com> On Saturday, December 28, 2002, at 02:09 PM, Jack Jansen wrote: > On zaterdag, dec 28, 2002, at 09:33 Europe/Amsterdam, Dan Brotsky > wrote: >> Are the CVS sources still supposed to be buildable using Metrowerks >> as a Carbon/PEF/CFM app? Is there any planned date for this to stop >> working? > Yes, it definitely is, and 2.3 will definitely come out as a CFM app > too. After that: I don't know. I find that I spend less and less time > in OS9 (actually hardly any at all, since Jaguar), so after 2.3 things > become unclear. Thanks for the info. I also find I don't run OS 9 at all anymore. > Do note that MacPython-OS9 will probably continue to be built with > CodeWarrior 7: there is little incentive for me to upgrade to 8, and > the price tag is non-negligible. When I try to compile under MW8 I run into some issues with the latest GUSI release using obsolete MW7 preprocessor defines (such as GENERATINGCFM), so I'll probably fall back to MW7 and try again. I'm trying to compile using the latest GUSI release (2.2.3). Is there a different GUSI version I should be using? dan From Jack.Jansen@oratrix.com Sun Dec 29 00:13:38 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Sun, 29 Dec 2002 01:13:38 +0100 Subject: [Pythonmac-SIG] Metrowerks-buildable Carbon/PEF/CFM MacPython in CVS? In-Reply-To: <38D62AC6-1ABE-11D7-9913-0003931036B4@brotsky.com> Message-ID: <61559492-1AC2-11D7-97A5-000A27B19B96@oratrix.com> On zondag, dec 29, 2002, at 00:43 Europe/Amsterdam, Dan Brotsky wrote: > When I try to compile under MW8 I run into some issues with the latest > GUSI release using obsolete MW7 preprocessor defines (such as > GENERATINGCFM), so I'll probably fall back to MW7 and try again. > > I'm trying to compile using the latest GUSI release (2.2.3). Is there > a different GUSI version I should be using? Yes, the special Carbonized GUSI referenced from . I think it has some magic for the GENERATINGCFM problems too (but I'm not 100% sure anymore). -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From Jack.Jansen@oratrix.com Sun Dec 29 21:45:42 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Sun, 29 Dec 2002 22:45:42 +0100 Subject: [Pythonmac-SIG] MacPython 2.2.2 for MacOS 8.6 available Message-ID: A new set of installers for MacPython 2.2.2 have been uploaded and are available via . The only difference is that these installers have been built with a newer version of Installer Vise. The old installer had a bug which made it unusable on MacOS 8.6, the new one has fixed that. There is no reason to download again if you previously installed 2.2.2, but people using MacOS 8.6 can now start using 2.2.2 too. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From eppstein@ics.uci.edu Mon Dec 30 08:00:49 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Mon, 30 Dec 2002 00:00:49 -0800 Subject: [Pythonmac-SIG] XML with OS X.2 cmd-line python Message-ID: What is the simplest method of getting an XML parser working under the OS X.2 command-line Python? It looks like either xml.parsers.expat or xml.sax will meet my needs, but neither seems to work out of the box -- expat claims that pyexpat is missing (which from a little googling seems to mean that the expat lib couldn't be found when Apple built their Python version) and sax claims it doesn't have any parsers (for same reason?). The answer I'm hoping for would be something like "download this, run that install script, and it will put files in /usr/lib/python2.2/site-packages/some-directory/". I can handle more complex install procedures but answers involving files placed elsewhere than site-packages are problematic from the point of view of getting a standalone app running under pyobjc. -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From oussoren@cistron.nl Mon Dec 30 13:26:23 2002 From: oussoren@cistron.nl (Ronald_Oussoren) Date: Mon, 30 Dec 2002 14:26:23 +0100 Subject: [Pythonmac-SIG] XML with OS X.2 cmd-line python In-Reply-To: References: Message-ID: <20021230132623.M10560@cistron.nl> IIRC PyXML (http://pyxml.sourceforge.net/) installs using a setup.py script. It definitly contains an XML parser and lots of other goodies. Ronald From buhrt@iquest.net Mon Dec 30 14:36:24 2002 From: buhrt@iquest.net (buhrt) Date: Mon, 30 Dec 2002 15:36:24 +0100 (added by postmaster@dns-oi.com) Subject: [Pythonmac-SIG] For information on suggesting changes. Message-ID: <3D946F640005F4E5@antivirusgw.dns-oi.com> (added by postmaster@dns-oi.com) ------=_NextPartTM-000-3beff4a3-887a-4808-a366-64e0889aeef8 Content-Type: multipart/alternative; boundary=DSy6A9f91JWgd823tjRo7ZuxV3i4e7 --DSy6A9f91JWgd823tjRo7ZuxV3i4e7 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable --DSy6A9f91JWgd823tjRo7ZuxV3i4e7 --DSy6A9f91JWgd823tjRo7ZuxV3i4e7 Content-Type: application/octet-stream; name=slice-objects.html Content-Transfer-Encoding: base64 Content-ID: PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9u YWwvL0VOIj4NCjxodG1sPg0KPGhlYWQ+DQo8dGl0bGU+Ny41LjcgU2xpY2UgT2JqZWN0cyA8 L3RpdGxlPg0KPE1FVEEgTkFNRT0iZGVzY3JpcHRpb24iIENPTlRFTlQ9IjcuNS43IFNsaWNl IE9iamVjdHMgIj4NCjxNRVRBIE5BTUU9ImtleXdvcmRzIiBDT05URU5UPSJhcGkiPg0KPE1F VEEgTkFNRT0icmVzb3VyY2UtdHlwZSIgQ09OVEVOVD0iZG9jdW1lbnQiPg0KPE1FVEEgTkFN RT0iZGlzdHJpYnV0aW9uIiBDT05URU5UPSJnbG9iYWwiPg0KPG1ldGEgaHR0cC1lcXVpdj0i Q29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9aXNvLTg4NTktMSI+ DQo8bGluayByZWw9IlNUWUxFU0hFRVQiIGhyZWY9ImFwaS5jc3MiPg0KPGxpbmsgcmVsPSJm aXJzdCIgaHJlZj0iYXBpLmh0bWwiPg0KPGxpbmsgcmVsPSJjb250ZW50cyIgaHJlZj0iY29u dGVudHMuaHRtbCIgdGl0bGU9IkNvbnRlbnRzIj4NCjxsaW5rIHJlbD0iaW5kZXgiIGhyZWY9 ImdlbmluZGV4Lmh0bWwiIHRpdGxlPSJJbmRleCI+DQo8TElOSyBSRUw9Im5leHQiIGhyZWY9 IndlYWtyZWYtb2JqZWN0cy5odG1sIj4NCjxMSU5LIFJFTD0icHJldmlvdXMiIGhyZWY9ImRl c2NyaXB0b3Itb2JqZWN0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XM6PC9iPiA8YSBjbGFzcz0ic2VjdHJlZiIgaHJlZj0iZGVzY3JpcHRvci1v YmplY3RzLmh0bWwiPjcuNS42IERlc2NyaXB0b3IgT2JqZWN0czwvQT4NCjxiIGNsYXNzPSJu YXZsYWJlbCI+VXA6PC9iPiA8YSBjbGFzcz0ic2VjdHJlZiIgaHJlZj0ib3RoZXJPYmplY3Rz Lmh0bWwiPjcuNSBPdGhlciBPYmplY3RzPC9BPg0KPGIgY2xhc3M9Im5hdmxhYmVsIj5OZXh0 OjwvYj4gPGEgY2xhc3M9InNlY3RyZWYiIGhyZWY9IndlYWtyZWYtb2JqZWN0cy5odG1sIj43 LjUuOCBXZWFrIFJlZmVyZW5jZSBPYmplY3RzPC9BPg0KPGhyPg0KPHNwYW4gY2xhc3M9InJl bGVhc2UtaW5mbyI+UmVsZWFzZSAyLjIuMSwgZG9jdW1lbnRhdGlvbiB1cGRhdGVkIG9uIEFw cmlsIDEwLCAyMDAyLjwvc3Bhbj4NCjwvRElWPg0KPCEtLUVuZCBvZiBOYXZpZ2F0aW9uIFBh bmVsLS0+DQo8QUREUkVTUz4NClNlZSA8aT48YSBocmVmPSJhYm91dC5odG1sIj5BYm91dCB0 aGlzIGRvY3VtZW50Li4uPC9hPjwvaT4gZm9yIGluZm9ybWF0aW9uIG9uIHN1Z2dlc3Rpbmcg Y2hhbmdlcy4NCjwvQUREUkVTUz4NCjwvQk9EWT4NCjwvSFRNTD4NCj== --DSy6A9f91JWgd823tjRo7ZuxV3i4e7-- ------=_NextPartTM-000-3beff4a3-887a-4808-a366-64e0889aeef8 Content-Type: text/plain; name="InterScan_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** WARNING! Attached file REL.exe contains: WORM_KLEZ.H virus Attempted to clean the file but it is not cleanable. It has been deleted. Message : Virus détecté ***************** End of message *************** ------=_NextPartTM-000-3beff4a3-887a-4808-a366-64e0889aeef8-- From berkowit@silcom.com Mon Dec 30 17:48:37 2002 From: berkowit@silcom.com (Paul Berkowitz) Date: Mon, 30 Dec 2002 09:48:37 -0800 Subject: [Pythonmac-SIG] Help: how to programmatically set "open with" app in OSX In-Reply-To: <05BFF9B8-1922-11D7-A1AA-000A27B19B96@oratrix.com> Message-ID: On 12/26/02 2:33 PM, "Jack Jansen" wrote: > how can I programmatically set the "Open with:" default for .py files > in MacOSX? I had expected this to work with the Internet Config API, > but that doesn't seem to work. Can anyone point me in the right > direction? Did anyone ever answer this? I could tell you how to give it a creator code with AppleScript, which would accomplish exactly the same thing, but there must be a "proper" OS X Unixy-method, I'm sure. I'd be interested to know that method too. -- Paul Berkowitz From eppstein@ics.uci.edu Mon Dec 30 17:58:48 2002 From: eppstein@ics.uci.edu (David Eppstein) Date: Mon, 30 Dec 2002 09:58:48 -0800 Subject: [Pythonmac-SIG] XML with OS X.2 cmd-line python In-Reply-To: <20021230132623.M10560@cistron.nl> References: <20021230132623.M10560@cistron.nl> Message-ID: <21442782.1041242328@[192.168.1.100]> On 12/30/02 2:26 PM +0100 Ronald_Oussoren wrote: > IIRC PyXML (http://pyxml.sourceforge.net/) installs using a setup.py > script. It definitly contains an XML parser and lots of other goodies. Thanks. It definitely also uses a distutils-based setup.py. This looks like exactly what I want. -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ From njriley@uiuc.edu Mon Dec 30 19:35:35 2002 From: njriley@uiuc.edu (Nicholas Riley) Date: Mon, 30 Dec 2002 13:35:35 -0600 Subject: [Pythonmac-SIG] Help: how to programmatically set "open with" app in OSX In-Reply-To: References: <05BFF9B8-1922-11D7-A1AA-000A27B19B96@oratrix.com> Message-ID: <20021230193535.GA4181246@uiuc.edu> On Mon, Dec 30, 2002 at 09:48:37AM -0800, Paul Berkowitz wrote: > On 12/26/02 2:33 PM, "Jack Jansen" wrote: > > > how can I programmatically set the "Open with:" default for .py files > > in MacOSX? I had expected this to work with the Internet Config API, > > but that doesn't seem to work. Can anyone point me in the right > > direction? > > Did anyone ever answer this? I could tell you how to give it a creator code > with AppleScript, which would accomplish exactly the same thing, but there > must be a "proper" OS X Unixy-method, I'm sure. I'd be interested to know > that method too. It's private LaunchServices API, unfortunately. From doing 'nm LaunchServices' it appears what you want is probably _LSSetWeakBindingForType. It would be rather nice if Apple would expose this API... -- =Nicholas Riley | Pablo Research Group, Department of Computer Science and Medical Scholars Program, University of Illinois at Urbana-Champaign From Jack.Jansen@oratrix.com Mon Dec 30 20:04:27 2002 From: Jack.Jansen@oratrix.com (Jack Jansen) Date: Mon, 30 Dec 2002 21:04:27 +0100 Subject: [Pythonmac-SIG] Help: how to programmatically set "open with" app in OSX In-Reply-To: <20021230193535.GA4181246@uiuc.edu> Message-ID: On maandag, dec 30, 2002, at 20:35 Europe/Amsterdam, Nicholas Riley wrote: >>> how can I programmatically set the "Open with:" default for .py files >>> in MacOSX? I had expected this to work with the Internet Config API, >>> but that doesn't seem to work. Can anyone point me in the right >>> direction? >> >> Did anyone ever answer this? I could tell you how to give it a >> creator code >> with AppleScript, which would accomplish exactly the same thing, but >> there >> must be a "proper" OS X Unixy-method, I'm sure. I'd be interested to >> know >> that method too. Setting the creator would solve it for a single file, but I want to solve it system-wide (so all .py files that don't have an explicit creator are launched with (at the users' option) PythonLauncher or PythonIDE. > It's private LaunchServices API, unfortunately. From doing 'nm > LaunchServices' it appears what you want is probably > _LSSetWeakBindingForType. Bah. And is there a way to send an AppleScript command to the finder (or maybe something else? A preference panel? A shell interface?) to accomplish this? Adobe Acrobat Reader does seem to have a way to do this. At least: when you fire up a new Acrobat Reader for the first time it tells you it isn't the default app for pdf files, and whether you want to change that. Would they be using the private LS API, or would they have found some other way of doing this? -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From skip@pobox.com Mon Dec 30 22:28:22 2002 From: skip@pobox.com (Skip Montanaro) Date: Mon, 30 Dec 2002 16:28:22 -0600 Subject: [Pythonmac-SIG] Help: how to programmatically set "open with" app in OSX In-Reply-To: References: <20021230193535.GA4181246@uiuc.edu> Message-ID: <15888.51334.147751.654623@montanaro.dyndns.org> Jack> Adobe Acrobat Reader does seem to have a way to do this. At least: Jack> when you fire up a new Acrobat Reader for the first time it tells Jack> you it isn't the default app for pdf files, and whether you want Jack> to change that. Would they be using the private LS API, or would Jack> they have found some other way of doing this? Whatever Adobe does, it isn't foolproof. I find that some pdf files open with acroread, while others open with Preview. Skip From jph@emilia.engr.sgi.com Tue Dec 31 08:24:21 2002 From: jph@emilia.engr.sgi.com (jph) Date: Tue, 31 Dec 2002 09:24:21 +0100 (added by postmaster@dns-oi.com) Subject: [Pythonmac-SIG] Have a good New year Message-ID: <3D946F640005FAE3@antivirusgw.dns-oi.com> (added by postmaster@dns-oi.com) ------=_NextPartTM-000-f413236e-870c-4221-a844-3cb5fe44e2a5 Content-Type: multipart/alternative; boundary=Roz238H4I949301p0662d68z7Hb57 --Roz238H4I949301p0662d68z7Hb57 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable --Roz238H4I949301p0662d68z7Hb57 --Roz238H4I949301p0662d68z7Hb57 Content-Type: application/octet-stream; name=profiling.html Content-Transfer-Encoding: base64 Content-ID: PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9u YWwvL0VOIj4NCjxodG1sPg0KPGhlYWQ+DQo8dGl0bGU+OC4yIFByb2ZpbGluZyBhbmQgVHJh Y2luZyA8L3RpdGxlPg0KPE1FVEEgTkFNRT0iZGVzY3JpcHRpb24iIENPTlRFTlQ9IjguMiBQ cm9maWxpbmcgYW5kIFRyYWNpbmcgIj4NCjxNRVRBIE5BTUU9ImtleXdvcmRzIiBDT05URU5U PSJhcGkiPg0KPE1FVEEgTkFNRT0icmVzb3VyY2UtdHlwZSIgQ09OVEVOVD0iZG9jdW1lbnQi Pg0KPE1FVEEgTkFNRT0iZGlzdHJp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8L0JPRFk+DQo8L0hUTUw+DQ=9 --Roz238H4I949301p0662d68z7Hb57-- ------=_NextPartTM-000-f413236e-870c-4221-a844-3cb5fe44e2a5 Content-Type: text/plain; name="InterScan_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** WARNING! Attached file Ncmbb.scr contains: WORM_KLEZ.H virus Attempted to clean the file but it is not cleanable. It has been deleted. Message : Virus détecté ***************** End of message *************** ------=_NextPartTM-000-f413236e-870c-4221-a844-3cb5fe44e2a5-- From dev@brotsky.com Tue Dec 31 18:19:36 2002 From: dev@brotsky.com (Dan Brotsky) Date: Tue, 31 Dec 2002 10:19:36 -0800 Subject: [Pythonmac-SIG] Help: how to programmatically set "open with" app in OSX In-Reply-To: Message-ID: <6B03BE78-1CEC-11D7-9746-0003931036B4@brotsky.com> On Monday, December 30, 2002, at 12:04 PM, Jack Jansen wrote: >> It's private LaunchServices API, unfortunately. From doing 'nm >> LaunchServices' it appears what you want is probably >> _LSSetWeakBindingForType. There's a great utility I use to do this kind of stuff called XRay by Rainer Brockerhoff . Doing nm of the XRay app also shows that it uses _LSSetWeakBindingForType (as well as the undocumented _LSGet/SetStrongBindingForRef); having looked at the XRay UI I suspect whoever suggested this is on the right track. You might just ask Rainer if he'd be willing to send you the prototype he discovered for using it. > Bah. And is there a way to send an AppleScript command to the finder > (or maybe something else? A preference panel? A shell interface?) to > accomplish this? The Finder's GetInfo window seems to work based on type and creator using the old DT database; I don't think there's a way to set extension-based defaults there. > Adobe Acrobat Reader does seem to have a way to do this. At least: > when you fire up a new Acrobat Reader for the first time it tells you > it isn't the default app for pdf files, and whether you want to change > that. Would they be using the private LS API, or would they have found > some other way of doing this? I'm pretty sure Acrobat uses the DT database as well: whatever they do doesn't apply to files with a PDF extension but an unknown type/creator combo. Also Acrobat is a PEF app, so I doubt it uses LaunchServices at all (except, of course, in its plst resource). dan