Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75612 > unrolled thread

Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix?

Started by"Peter Tomcsanyi" <tomcsanyi@slovanet.sk>
First post2014-08-03 19:24 +0200
Last post2014-08-04 12:17 +0200
Articles 6 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix? "Peter Tomcsanyi" <tomcsanyi@slovanet.sk> - 2014-08-03 19:24 +0200
    Re: Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix? Kevin Walzer <kw@codebykevin.com> - 2014-08-03 18:10 -0400
      Re: Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix? "Peter Tomcsanyi" <tomcsanyi@slovanet.sk> - 2014-08-04 11:40 +0200
        Re: Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix? Kevin Walzer <kw@codebykevin.com> - 2014-08-04 08:16 -0400
          Re: Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix? "Peter Tomcsanyi" <tomcsanyi@slovanet.sk> - 2014-08-04 21:42 +0200
      typo correction "Peter Tomcsanyi" <tomcsanyi@slovanet.sk> - 2014-08-04 12:17 +0200

#75612 — Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix?

From"Peter Tomcsanyi" <tomcsanyi@slovanet.sk>
Date2014-08-03 19:24 +0200
SubjectTcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix?
Message-ID<mailman.12591.1407086670.18130.python-list@python.org>
Hello to all,

My OSX is 10.9 Mavericks.
I use Python 3.4. with ActiveTcl 8.5.15.1.

I was struggling with several approaches to using PNG files with alpha 
channel (partial transparency).
Following my question in this newsgroup (see the thread "Python 3.4.1 
installer on Mac links Python to old Tcl/Tk" and all the kind suggestions 
what to do), I have tried several things:
- Used the package Img with Tk 8.5
- Used PIL to load the file and then converting it by ImageTk.PhotoImage.
- Installed MacPorts' version of Python 3.4 with Tk 8.6
But none of the approaches were able to show corretly my partially 
transparent image - the image was loaded and shown but the alpha channel was 
reduced to binary transparency.

I think that it is because of this problem in Mavericks:
http://core.tcl.tk/tk/tktview?name=99b84e49ff

The above link says that it has been solved in Tcl/Tk.
But: what does it mean for me - a Python user?
Can anyone say when a version containing the above bug fix will be available 
in a form of an installable package that I can use with Python on a Mac?
How can I know that such a package is avaibale?
Or can anyone point me to some instructions how could I compile Tcl/Tk for 
myslef and (more importanty) how to install the result of that compilation 
so that Python 3.4 recognizes that it should use that package (and not three 
other installations of Tcl/Tk in my computer)?

Thanks,

Peter 

[toc] | [next] | [standalone]


#75622

FromKevin Walzer <kw@codebykevin.com>
Date2014-08-03 18:10 -0400
Message-ID<lrmc0r$suj$1@dont-email.me>
In reply to#75612
On 8/3/14, 1:24 PM, Peter Tomcsanyi wrote:

>
> I think that it is because of this problem in Mavericks:
> http://core.tcl.tk/tk/tktview?name=99b84e49ff
>
> The above link says that it has been solved in Tcl/Tk.
> But: what does it mean for me - a Python user?
> Can anyone say when a version containing the above bug fix will be
> available in a form of an installable package that I can use with Python
> on a Mac?
> How can I know that such a package is avaibale?
> Or can anyone point me to some instructions how could I compile Tcl/Tk
> for myslef and (more importanty) how to install the result of that
> compilation so that Python 3.4 recognizes that it should use that
> package (and not three other installations of Tcl/Tk in my computer)?
>

New releases of Tcl/Tk 8.5 and 8.6 are due out soon; right now they are 
undergoing final testing as betas/release candidates.

If you are using the standard Python installer from Python.org, then you 
can wait for ActiveTcl to be updated (not sure of their release 
schedule) or you can download the source tarballs for Tcl and Tk when 
they are released, untar them to a specific directory, cd to the 
directory, and run these commands:

make -C $insert_tcl_dirname_here/macosx
make -C $insert_tk_dirname_here/macosx

and then

sudo make -C $insert_tcl_dirname_here/macosx install
sudo make -C $insert_tk_dirname_here/macosx install

This will install the updated version of Tcl and Tk in 
/Library/Frameworks, and Python should pick them up.

These instructions assume you have Apple's developer tools installed and 
are at least minimally comfortable using the command line.

If you have installed Python via some other process, cf. MacPorts or 
Homebrew, you'll have to wait until they pick up the new versions of Tcl 
and Tk and follow their instructions for upgrading.

Hope this helps,
Kevin

-- 
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

[toc] | [prev] | [next] | [standalone]


#75676

From"Peter Tomcsanyi" <tomcsanyi@slovanet.sk>
Date2014-08-04 11:40 +0200
Message-ID<mailman.12631.1407145237.18130.python-list@python.org>
In reply to#75622
"Kevin Walzer" <kw@codebykevin.com> wrote in message 
news:lrmc0r$suj$1@dont-email.me...
> New releases of Tcl/Tk 8.5 and 8.6 are due out soon; right now they are 
> undergoing final testing as betas/release candidates.

Thanks for the promising news.
Where should I look for the announcement that there is something new?
Is this the correct place?
http://sourceforge.net/projects/tcl/files/Tcl/

But will be the 8.5. branch updated, too?
I need 8.5 because CPython on Mac does not yet use 8.6...
I cannot see there 8.5.15.1 (at least that is how ActiveTcl is numbered) 
which solved some oter Mavericks issues in October 2013 (all 8.5. files are 
older than October 2013)...
So will be there a 8.5.16?

> you can download the source tarballs for Tcl and Tk when they are 
> released, untar them to a specific directory, cd to the directory, and run 
> these commands:
>
> make -C $insert_tcl_dirname_here/macosx
> make -C $insert_tk_dirname_here/macosx
>
> and then
>
> sudo make -C $insert_tcl_dirname_here/macosx install
> sudo make -C $insert_tk_dirname_here/macosx install

I have some command line skills and I have the command line developer tools 
installed (is that enough?), but I am not sure if I understand which 
directory's name is $insert_tcl_dirname_here (I suppose that the $ sign 
belongs to the name of the "variable", am I right?). Is it the directory 
where I unterd tcl (and which is under the directory where i cd-ed to)?

> This will install the updated version of Tcl and Tk in 
> /Library/Frameworks, and Python should pick them up.

Well, should...
I will try. But when I followed a similar procedure of installing the tkpng 
package then after "sudo make install" it seemed to be ok, but it was 
apparently added to other version of Tk than CPython is using...
Can somebody else confirm or disconfirm that the above procedure will 
install the new Tcl/Tk to that place where CPython (that is already 
installed) will pick it from? Or do I need to reinstall CPython after this? 
Or...?

Thanks

Peter Tomcsanyi

[toc] | [prev] | [next] | [standalone]


#75684

FromKevin Walzer <kw@codebykevin.com>
Date2014-08-04 08:16 -0400
Message-ID<lrntjm$bma$1@dont-email.me>
In reply to#75676
On 8/4/14, 5:40 AM, Peter Tomcsanyi wrote:
> "Kevin Walzer" <kw@codebykevin.com> wrote in message
> news:lrmc0r$suj$1@dont-email.me...
>> New releases of Tcl/Tk 8.5 and 8.6 are due out soon; right now they
>> are undergoing final testing as betas/release candidates.
>
> Thanks for the promising news.
> Where should I look for the announcement that there is something new?
> Is this the correct place?
> http://sourceforge.net/projects/tcl/files/Tcl/

You can check comp.lang.tcl for an announcement.
>
> But will be the 8.5. branch updated, too?
> I need 8.5 because CPython on Mac does not yet use 8.6...
> I cannot see there 8.5.15.1 (at least that is how ActiveTcl is numbered)
> which solved some oter Mavericks issues in October 2013 (all 8.5. files
> are older than October 2013)...
> So will be there a 8.5.16?

8.5 and 8.6 will be updated.
>
>> you can download the source tarballs for Tcl and Tk when they are
>> released, untar them to a specific directory, cd to the directory, and
>> run these commands:
>>
>> make -C $insert_tcl_dirname_here/macosx
>> make -C $insert_tk_dirname_here/macosx
>>
>> and then
>>
>> sudo make -C $insert_tcl_dirname_here/macosx install
>> sudo make -C $insert_tk_dirname_here/macosx install
>
> I have some command line skills and I have the command line developer
> tools installed (is that enough?), but I am not sure if I understand
> which directory's name is $insert_tcl_dirname_here (I suppose that the $
> sign belongs to the name of the "variable", am I right?). Is it the
> directory where I unterd tcl (and which is under the directory where i
> cd-ed to)?

$insert_tcl_dirname = something like tcl8.5.16. Just look at the numbering.

In other words, you want a directory with two subdirectories: tcl8.5.16 
and tk8.5.16 (since you are looking at 8.5).
>
>> This will install the updated version of Tcl and Tk in
>> /Library/Frameworks, and Python should pick them up.
>
> Well, should...
> I will try. But when I followed a similar procedure of installing the
> tkpng package then after "sudo make install" it seemed to be ok, but it
> was apparently added to other version of Tk than CPython is using...
> Can somebody else confirm or disconfirm that the above procedure will
> install the new Tcl/Tk to that place where CPython (that is already
> installed) will pick it from? Or do I need to reinstall CPython after
> this? Or...?

Where is your current installation of Python? The above instructions 
assume that you are using the standard Python from python.org. As I 
mentioned before, if you have installed things via a package manager 
(brew, Fink or MacPorts) you will have to follow their instructions.

--Kevin


-- 
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

[toc] | [prev] | [next] | [standalone]


#75706

From"Peter Tomcsanyi" <tomcsanyi@slovanet.sk>
Date2014-08-04 21:42 +0200
Message-ID<mailman.12652.1407181369.18130.python-list@python.org>
In reply to#75684
Many thanks for all the answers.

"Kevin Walzer" <kw@codebykevin.com> wrote in message 
news:lrntjm$bma$1@dont-email.me...
> Where is your current installation of Python? The above instructions 
> assume that you are using the standard Python from python.org. As I 
> mentioned before, if you have installed things via a package manager 
> (brew, Fink or MacPorts) you will have to follow their instructions.

I use the standard Python.org installation, so I assume that it is "where it 
should be" (I launch IDLE from Launcher or I open .py files by righclicking 
them and choosing "Open in IDLE"). But it does not contain Tcl/Tk, it uses 
"somehow" the version of Tcl/Tk that is installed "somewhere".
Actually the page:
https://www.python.org/download/mac/tcltk
says that it is linked dynamically and it looks at first into 
/Library/Frameworks.
So maybe for now I have enough information and I will try your suggestions 
when the new Tcl/Tk will be available and ask more questions only if it 
would not work.

Thanks

Peter Tomcsanyi

[toc] | [prev] | [next] | [standalone]


#75679 — typo correction

From"Peter Tomcsanyi" <tomcsanyi@slovanet.sk>
Date2014-08-04 12:17 +0200
Subjecttypo correction
Message-ID<mailman.12634.1407147446.18130.python-list@python.org>
In reply to#75622
Now I see that I wrote a quite unreadable typo: "unterd".
I meant "untared".

Peter Tomcsanyi

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web