[Pythonmac-SIG] Re: Tkinter support for Carbon - I give up.

Martin Miller mmiller@adobe.com
Mon, 11 Feb 2002 12:12:19 -0800


Before I cast a vote, can someone tell me if there's an alternative way
to create Python programs with a portable GUI? "Portable" here meaning
same things runs on Unix, Carbon MacOS, and 32-bit Windows.

Regards,
Martin

======================================
pythonmac-sig-request@python.org wrote:
> 
> Send Pythonmac-SIG mailing list submissions to
>         pythonmac-sig@python.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mail.python.org/mailman/listinfo/pythonmac-sig
> or, via email, send a message with subject or body 'help' to
>         pythonmac-sig-request@python.org
> 
> You can reach the person managing the list at
>         pythonmac-sig-admin@python.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Pythonmac-SIG digest..."
> 
>   ------------------------------------------------------------------------
> Today's Topics:
> 
>    1. Tkinter support for Carbon - I give up. (Jack Jansen)
>    2. Re: Tkinter support for Carbon - I give up. (Larry Meyn)
>    3. making an alias of a folder (Christopher Smith)
>    4. Re: Tkinter support for Carbon - I give up. (John W Baxter)
>    5. Re: [Tutor] making an alias of a folder (Danny Yoo)
>    6. Re: Re: [Tutor] making an alias of a folder (Jack Jansen)
>    7. Re: Tkinter support for Carbon - I give up. (Jon Bradley)
>    8. Unix Python on OSX (Just van Rossum)
>    9. Re: making an alias of a folder (Christopher Smith)
>   10. Re: Unix Python on OSX (Jack Jansen)
> 
>   ------------------------------------------------------------------------
> 
> Subject: [Pythonmac-SIG] Tkinter support for Carbon - I give up.
> Date: Sun, 10 Feb 2002 23:18:54 +0100
> From: Jack Jansen <Jack.Jansen@oratrix.nl>
> To: pythonmac-sig@python.org
> 
> Folks,
> I'm going to give up on supporting Tkinter under Carbon. Over
> the last week I've lost many hours trying to beat
> _tkinter.carbon.slb into shape, with no effect. I've tried
> various devious approaches, such as linking against both
> CarbonLib and InterfaceLib, using the PseudoCarbonLib from Tk
> 8.3.2 (when I finally managed to find and download it:-) and a
> couple of other things, but I simply cannot get it to work: the
> mouse problem and the delayed even problem keep happening (or I
> simply can't get the thing to run at all).
> 
> So, unless someone else wants to take over: there's not going to
> be Tk support in Carbon MacPython.
> 
> That, however, means I want to put an earlier issue back to the
> vote: should MacPython 2.3 be Carbon-only or both classic and
> Carbon? People overwhelmingly voted for Carbon-only in December,
> but that was when Tk support under carbon still looked possible.
> 
> There is a third possibility: that MacPython 2.3 has limited
> support for classic PPC: a ClassicPythonInterpreter only, no
> support (or limited support) for a classic IDE and other
> goodies. This will mean that IDE development can go fully Carbon
> and not be hampered by classic, while people who want to run
> occasional Tkinter scripts can still do so.
> 
> So: let's have your votes, or if there are alternatives I
> missed: speak up!
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution --
> Emma Goldman -
> 
>   ------------------------------------------------------------------------
> 
> Subject: Re: [Pythonmac-SIG] Tkinter support for Carbon - I give up.
> Date: Sun, 10 Feb 2002 15:06:53 -0800
> From: Larry Meyn <lmeyn@mail.arc.nasa.gov>
> To: pythonmac-sig@python.org
> References: <2B499A33-1E74-11D6-A888-003065517236@oratrix.nl>
> 
> At 11:18 PM +0100 2/10/02, Jack Jansen wrote:
> >
> >That, however, means I want to put an earlier issue back to the
> >vote: should MacPython 2.3 be Carbon-only or both classic and
> >Carbon? People overwhelmingly voted for Carbon-only in December, but
> >that was when Tk support under carbon still looked possible.
> >
> >There is a third possibility: that MacPython 2.3 has limited support
> >for classic PPC: a ClassicPythonInterpreter only, no support (or
> >limited support) for a classic IDE and other goodies. This will mean
> >that IDE development can go fully Carbon and not be hampered by
> >classic, while people who want to run occasional Tkinter scripts can
> >still do so.
> 
> I see three MacPython 2.3 options which I'll number:
> 
> Option 1: Carbon Only
> 
> Option 2: Carbon & Classic
> 
> Option 3: Carbon & Interpreter Only Classic
> 
> I would vote for #1.  If I need Tk, I can run 2.2 Classic or earlier.
> And this frees up Jack's valuable time.  If people really feel they
> need Python 2.3 and newer features along with Tk support, maybe
> option 3 if it is not too much of a burden on Jack's time.
> 
> --
> ----------------------------------------------------------------------
> Larry Meyn
> Aerospace Operations Modeling Office
> 
> M/S 210-10                      Phone:  (650) 604-5038
> NASA Ames Research Center       FAX:    (650) 604-0222
> Moffett Field, CA 94035-1000    email:  lmeyn@mail.arc.nasa.gov
>                                  E-FAX:  (425) 944-5526 sent via e-mail
> ----------------------------------------------------------------------
> 
>   ------------------------------------------------------------------------
> 
> Subject: [Pythonmac-SIG] making an alias of a folder
> Date: Sun, 10 Feb 2002 17:21:35 -0600
> From: "Christopher Smith" <csmith@blakeschool.org>
> To: pythonmac-sig@python.org, tutor@python.org, edu-sig@python.org
> 
> I think I put this request out before but haven't received any
> replies...perhaps there is someone new on the list that could help:
> 
> Does anyone have a piece of code that successfully makes an alias of a
> folder on the MacOS?
> 
> Even if you know how to do this in RealBasic or VisualBasic and could send
> me that code snippet I think it would be useful.  I'm trying to complete a
> patch to a file copying routine.
> 
> /c
> 
>   ------------------------------------------------------------------------
> 
> Subject: Re: [Pythonmac-SIG] Tkinter support for Carbon - I give up.
> Date: Sun, 10 Feb 2002 17:07:28 -0800
> From: John W Baxter <jwblist@olympus.net>
> To: pythonmac-sig@python.org
> References: <2B499A33-1E74-11D6-A888-003065517236@oratrix.nl>
> 
> At 23:18 +0100 2/10/2002, Jack Jansen wrote:
> >So, unless someone else wants to take over: there's not going to
> >be Tk support in Carbon MacPython.
> 
> As a confirmed non-user of Tk on any platform, I have no problem with that.
>    Mac:  I'm so used to Tk problems I haven't tried in ages
>    Unix/Linux:  I *could* use Tk on the Linux "side" of my laptop, but I
> couldn't transport the results to work (we don't use X-Windows except on
> the machine consoles, which are 15 miles away from me).
>    Windows:  I've never seen any reason to install Python on the Windows
> "side" of my laptop.
> 
> >
> >That, however, means I want to put an earlier issue back to the
> >vote: should MacPython 2.3 be Carbon-only or both classic and
> >Carbon? People overwhelmingly voted for Carbon-only in December,
> >but that was when Tk support under carbon still looked possible.
> >
> >There is a third possibility: that MacPython 2.3 has limited
> >support for classic PPC: a ClassicPythonInterpreter only, no
> >support (or limited support) for a classic IDE and other
> >goodies. This will mean that IDE development can go fully Carbon
> >and not be hampered by classic, while people who want to run
> >occasional Tkinter scripts can still do so.
> 
> I think your third possibility makes sense (on the assumption that you
> wouldn't have offered it if it caused you much trouble to create).
> 
> [I also don't use the IDE...I edit in BBEdit whilst building Python scripts
> on the Mac...in emacs whilst on Linux.]
> 
> Because I don't use two things I say I don't care about, I would think my
> vote would be discounted...perhaps to a half vote.
> 
>    --John
> 
> --
> John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA
> 
>   ------------------------------------------------------------------------
> 
> Subject: [Pythonmac-SIG] Re: [Tutor] making an alias of a folder
> Date: Sun, 10 Feb 2002 19:23:11 -0800 (PST)
> From: Danny Yoo <dyoo@hkn.eecs.berkeley.edu>
> To: Christopher Smith <csmith@blakeschool.org>
> CC: pythonmac-sig@python.org, tutor@python.org, edu-sig@python.org
> 
> On Sun, 10 Feb 2002, Christopher Smith wrote:
> 
> > I think I put this request out before but haven't received any
> > replies...perhaps there is someone new on the list that could help:
> >
> > Does anyone have a piece of code that successfully makes an alias of a
> > folder on the MacOS?
> 
> Hello!
> 
> First, I'd better admit I'm clueless about this one... *grin* You might be
> able to find something in here:
> 
>     http://www.python.org/doc/current/mac/mac.html
> 
> I don't have a Macintosh available at the moment, so I can't test this,
> but I believe that the macfs.NewAliasMinimalFromFullPath() is the function
> that you're looking for:
> 
>     http://www.python.org/doc/current/mac/module-macfs.html
> 
> Good luck to you!
> 
>   ------------------------------------------------------------------------
> 
> Subject: Re: [Pythonmac-SIG] Re: [Tutor] making an alias of a folder
> Date: Mon, 11 Feb 2002 11:29:04 +0100
> From: Jack Jansen <jack@oratrix.com>
> To: Christopher Smith <csmith@blakeschool.org>
> CC: Danny Yoo <dyoo@hkn.eecs.berkeley.edu>, pythonmac-sig@python.org,
>      tutor@python.org, edu-sig@python.org
> 
> I was going to point you to the convenience routine
> macostools.mkalias(src, dst), until I tried it and noticed it didn't
> work for folders:-(
> 
> I've filed a sourceforge bug report (#515830), you may want to monitor
> this if you're interested in when this is fixed.
> 
> On Monday, February 11, 2002, at 04:23 , Danny Yoo wrote:
> 
> > On Sun, 10 Feb 2002, Christopher Smith wrote:
> >
> >> I think I put this request out before but haven't received any
> >> replies...perhaps there is someone new on the list that could help:
> >>
> >> Does anyone have a piece of code that successfully makes an alias of a
> >> folder on the MacOS?
> >
> > Hello!
> >
> > First, I'd better admit I'm clueless about this one... *grin* You might
> > be
> > able to find something in here:
> >
> >     http://www.python.org/doc/current/mac/mac.html
> >
> > I don't have a Macintosh available at the moment, so I can't test this,
> > but I believe that the macfs.NewAliasMinimalFromFullPath() is the
> > function
> > that you're looking for:
> >
> >     http://www.python.org/doc/current/mac/module-macfs.html
> >
> >
> > Good luck to you!
> >
> >
> > _______________________________________________
> > Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> > http://mail.python.org/mailman/listinfo/pythonmac-sig
> >
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution -- Emma
> Goldman -
> 
>   ------------------------------------------------------------------------
> 
> Subject: Re: [Pythonmac-SIG] Tkinter support for Carbon - I give up.
> Date: Mon, 11 Feb 2002 06:24:37 -0500
> From: Jon Bradley <jbradley@thinqinteractive.com>
> To: <pythonmac-sig@python.org>
> 
> > From: Jack Jansen <Jack.Jansen@oratrix.nl>
> >
> > So, unless someone else wants to take over: there's not going to
> > be Tk support in Carbon MacPython.
> >
> > That, however, means I want to put an earlier issue back to the
> > vote: should MacPython 2.3 be Carbon-only or both classic and
> > Carbon? People overwhelmingly voted for Carbon-only in December,
> > but that was when Tk support under carbon still looked possible.
> >
> > There is a third possibility: that MacPython 2.3 has limited
> > support for classic PPC: a ClassicPythonInterpreter only, no
> > support (or limited support) for a classic IDE and other
> > goodies. This will mean that IDE development can go fully Carbon
> > and not be hampered by classic, while people who want to run
> > occasional Tkinter scripts can still do so.
> >
> > So: let's have your votes, or if there are alternatives I
> > missed: speak up!
> > --
> > - Jack Jansen        <Jack.Jansen@oratrix.com>
> 
> MacApp, please.  :)  It's going to be around for a long time and supporting
> it could be a great great thing.  I know you'd make my job easier, and would
> make tons and tons of mac developers psyched.
> 
> Jon Bradley
> Multimedia Developer
> 
> T H I N Q  Interactive ------
> 693 East Avenue  -  Suite 102
> Rochester, New York     14607
> 
>   ------------------------------------------------------------------------
> 
> Subject: [Pythonmac-SIG] Unix Python on OSX
> Date: Mon, 11 Feb 2002 15:35:16 +0100
> From: Just van Rossum <just@letterror.com>
> To: pythonmac-sig@python.org
> 
> I'm trying to update my plain vanilla unix Python install to the current CVS
> state, and now get this error during make:
> 
> Python/dynload_next.o Python/dynload_next.c
> Python/dynload_next.c: In function `_PyImport_GetDynLoadFunc':
> Python/dynload_next.c:113: warning: control reaches end of non-void function
> Python/dynload_next.c: At top level:
> Python/dynload_next.c:115: parse error before `return'
> make: *** [Python/dynload_next.o] Error 1
> 
> ./configure was invoked without arguments, which I thought was meant to work
> these days?
> 
> Just
> 
>   ------------------------------------------------------------------------
> 
> Subject: [Pythonmac-SIG] Re: making an alias of a folder
> Date: Mon, 11 Feb 2002 09:09:35 -0600
> From: "Christopher Smith" <csmith@blakeschool.org>
> To: dyoo@hkn.eecs.berkeley.edu
> CC: jack@oratrix.com, pythonmac-sig@python.org, edu-sig@python.org,
>      tutor@python.org
> References: <E16aHgY-00033a-00@mail.python.org>
> 
> Danny Yoo writes:
> <cut>
> >
> >I don't have a Macintosh available at the moment, so I can't test this,
> >but I believe that the macfs.NewAliasMinimalFromFullPath() is the function
> >that you're looking for:
> >
> >    http://www.python.org/doc/current/mac/module-macfs.html
> 
> I looked at that and didn't initially think that it was going to help but
> your saying it might be the thing made me look again.  Though I don't know
> if I've got everything right, I do have a routine now that will make an
> alias of a folder.  I don't understand the "relative" option yet, though.
> Those more in the know about the mac toolbox may see other things that I
> don't know as well. :-)  Until the macostools.makealias is fixed, this is
> a workaround.
> 
> Thanks for the nudge, Danny.  And thanks for filing a bug report, Jack.
> 
> /c
> 
> ####
> import macfs
> from Carbon import Res
> 
> #
> # Doesn't yet handle the relative option; I'm not sure what this
> # means for an alias yet.
> #
> def mkfolderalias(src, dst, relative=None):
>         """Create an alias to a folder"""
>         alias = macfs.NewAliasMinimalFromFullPath(dst)
>         dstfss = alias.Resolve()[0]
>         Res.FSpCreateResFile(dstfss, 'MACS', 'fdrp', -1)
> 
>         # make it point at the src and update the resource
>         # {see Mac Lib Modules; v 2.2; sect 2.4.2 Alias Objects}
>         # If the source is itself an alias, the new alias
>         # will point at the same thing that the src alias is
>         # pointing at.  If the src is *not* a folder it will then
>         # still point at the file but the icon will be a folder
>         # icon until it is updated by the Finder (e.g. after
>         # double clicking on it in the Finder).
>         #
>         alias.Update(src)
>         h = Res.FSpOpenResFile(dstfss, 3)
>         resource = Res.Resource(alias.data)
>         resource.AddResource('alis', 0, '')
>         Res.CloseResFile(h)
> 
>         # turn it into an alias icon; before doing this the
>         # folder icon will be "busy and in use by the system"
>         #
>         dstfss = macfs.FSSpec(dst)
>         dstfinfo = dstfss.GetFInfo()
>         dstfinfo.Flags = dstfinfo.Flags|0x8000    # Alias flag
>         dstfss.SetFInfo(dstfinfo)
> ####
> 
>   ------------------------------------------------------------------------
> 
> Subject: Re: [Pythonmac-SIG] Unix Python on OSX
> Date: Mon, 11 Feb 2002 16:52:27 +0100
> From: Jack Jansen <jack@oratrix.com>
> To: Just van Rossum <just@letterror.com>
> CC: pythonmac-sig@python.org
> 
> On Monday, February 11, 2002, at 03:35 , Just van Rossum wrote:
> 
> > I'm trying to update my plain vanilla unix Python install to the
> > current CVS
> > state, and now get this error during make:
> >
> > Python/dynload_next.o Python/dynload_next.c
> > Python/dynload_next.c: In function `_PyImport_GetDynLoadFunc':
> > Python/dynload_next.c:113: warning: control reaches end of non-void
> > function
> > Python/dynload_next.c: At top level:
> > Python/dynload_next.c:115: parse error before `return'
> > make: *** [Python/dynload_next.o] Error 1
> 
> Ouch, that is a very silly error, there's an extra "}" in the file! The
> strange thing is that I did actually test my mods, so I don't know when
> it creeped in...
> 
> I'll check in the fix when I've tested that it doesn't break anything
> (at least: doesn't break the standard test suite), in the mean time you
> can remove line 114 (with the lone "}").
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution -- Emma
> Goldman -