Re: Antialiased fonts in Tk Tkinter in Ubuntu 8.04

2008-05-21 Thread Edward K. Ream
On Mon, May 12, 2008 at 12:28 PM, Ville M. Vainio [EMAIL PROTECTED]
wrote:




   Packages which ubuntu thinks depend on tk8.4, like PIL, ImageTk, tkcvs
   etc., you will need to build from source, but others should work ok.


This is a nightmare.  Googling download ImageTk brings me to
http://packages.ubuntu.com/hardy/python/python-imaging-tk

If you can understand this gobbledygook  you understand far more than I do.

Python simply must clean up its act.

Hmm.  I just had a thought.  Could I (and all of Leo's users) bypass these
problems by using ipython?

Edward

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: Antialiased fonts in Tk Tkinter in Ubuntu 8.04

2008-05-21 Thread Edward K. Ream
On Wed, May 21, 2008 at 8:10 AM, Edward K. Ream [EMAIL PROTECTED] wrote:


 On Mon, May 12, 2008 at 12:28 PM, Ville M. Vainio [EMAIL PROTECTED]
 wrote:

Packages which ubuntu thinks depend on tk8.4, like PIL, ImageTk, tkcvs
   etc., you will need to build from source, but others should work ok.


 This is a nightmare.  Googling download ImageTk brings me to
 http://packages.ubuntu.com/hardy/python/python-imaging-tk

 If you can understand this gobbledygook  you understand far more than I do.



Actually, just installing Python2.5.2 as Terry described solved my problems
with fonts.  Notes:

- Here is an excellent how-to for installing packages on ubuntu from
sources:

https://help.ubuntu.com/community/CompilingEasyHowTo

For example, it describes the tar args needed, where to put stuff, etc.

- The procedure Terry describes will install from /usr/local/src to /usr/bin

- I have no idea where the links files are.  But since Python works it
should allow Ubuntu to restart even if ubuntu starts using the
newly-installed python.  And indeed, restarting Ubuntu went well.

- I changed 'leo' alias so it explicitly uses /usr/bin/python2.5.  That
should be enough to guarantee I always use the newly-installed python.

Hope this helps everyone.

BTW, I am now seeing the get_focus crash.  The workaround will probably be
to ignore any exception...

Edward

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: Antialiased fonts in Tk Tkinter in Ubuntu 8.04

2008-05-21 Thread Terry Brown

On Wed, 21 May 2008 08:10:56 -0500
Edward K. Ream [EMAIL PROTECTED] wrote:

Packages which ubuntu thinks depend on tk8.4, like PIL, ImageTk,
   tkcvs etc., you will need to build from source, but others should
   work ok.  
   
 This is a nightmare.  Googling download ImageTk brings me to
 http://packages.ubuntu.com/hardy/python/python-imaging-tk

I guess I don't really see the problem.  If you're not aiming for
anti-aliased fonts, you should be able to get all the required imports
by:

  sudo apt-get install python-imaging-tk python-imaging tk8.4 python-tk

If leo was a .deb package you'd just install that and it would tell you
about the dependencies and ask for permission to install them.

It feels to me like it's time to suddenly veer completely off topic.

I recently started playing with Virtual Box from Sun, and have
installed and run Ubuntu 8.04 under Windows XP, and Windows XP under
Ubuntu 8.04.  A virtual Ubuntu 8.04 (under Ubuntu 8.04 would be fine)
would be a good way of maintaining a virgin Ubuntu install to test Leo
installation - Virtual Box has a snapshot feature so you only need to
do the initial install of Ubuntu once, and thereafter you can return to
a clean state.

There are other virtualization solutions, but Virtual Box is very easy
to use, which I think recommends it for this type of virtualization
application.

Cheers -Terry

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: Antialiased fonts in Tk Tkinter in Ubuntu 8.04

2008-05-21 Thread Terry Brown

On Wed, 21 May 2008 17:22:51 +0300
Ville M. Vainio [EMAIL PROTECTED] wrote:

  - I have no idea where the links files are.  But since Python works
  it should allow Ubuntu to restart even if ubuntu starts using the
  newly-installed python.  And indeed, restarting Ubuntu went well.  
 
 I'm still a bit concerned about this approach, since it messes with
 the system python. What will happen when security fixes for python
 come up? What about the python packages you install with apt-get later
 on, will they be available normally?
 
 Of course all this may work, but caution should be advised.

You have a point.  So far I've found that all other python packages
work, the key to getting that to happen was compiling python from
source with the --enable-unicode=ucs4 flag as the default is ucs2 but
ubuntu uses ucs4.  Packages linked against Tk8.4 have to be compiled
from source.

You're right about security fixes for python - you'd have to make a
point of recompiling from the latest source to get those I guess.

Here's my original how to for anti-aliased fonts
with Ubuntu 8.04,

http://www.mail-archive.com/leo-editor@googlegroups.com/msg00320.html

with the addendum that when I moved to a new machine just a few days
ago I found I couldn't get PIL to compile from source without changing
to occurrences of '#import tk.h' to '#import tcl8.5/tk.h'.

I think the real solution is for leo and python to move to gtk - I
understand how the relationship between python and tk evolved, but I
can't see how tk can sensibly evolve to be a modern gui toolkit
without basically duplicating gtk at that point.

gtk support is good for linux / windows / mac os X, but probably weaker
for some of the other unixen out there on which tk works well - so
that's a problem.  On the other hand tk doesn't have to go away, and
hopefully python 2.6 / 3.0 will be linked against tk 8.5 in future
distros anyway, so we're really just experiencing growing pains.

At least open source gives us the tools to fix things.

Cheers -Terry

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: Antialiased fonts in Tk Tkinter in Ubuntu 8.04

2008-05-13 Thread Edward K. Ream
On Mon, May 12, 2008 at 12:28 PM, Ville M. Vainio [EMAIL PROTECTED]
wrote:

Thanks for these instructions re anti-aliased fonts.  As you know, I've been
obsessed with key bindings lately, but I plan to get around to rescuing the
ubuntu version of Leo soon...

Edward

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: Antialiased fonts in Tk Tkinter in Ubuntu 8.04

2008-04-05 Thread Edward K. Ream
On Fri, Apr 4, 2008 at 10:29 AM, Terry Brown [EMAIL PROTECTED]
wrote:


 I don't advise anyone to try and get anti-aliased fonts working in
 Linux (Ubuntu) by compiling python against Tk8.5, there's too much risk of
 messing things up.  But I think I have it working now, so if you really want
 to...


[big snip]

Or just wait for python 2.6/3.0 :-)


Thanks for these instructions.  I do hope Python fixes the recent major
tkinter problems soon.

Edward

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---