Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How does IDLE do it?

Reply
Thread Tools

How does IDLE do it?

 
 
Richard D. Moores
Guest
Posts: n/a
 
      02-11-2011
I recently wrote some code that prints information about the 'jukugo'
used in Japanese newspaper articles. A jukugo is a Japanese word
written with at least 2 kanji. An example of a 2-kanji jukugo is 危機
(kiki -- crisis). I found that I could not use my usual IDE to render
the Japanese correctly in either the code or the output. But IDLE
(version 3.1.2; Windows Vista) does a beautiful job! See screen shots
<http://www.rcblue.com/Misc/Japanese_in_code_with_Courier_New_in_IDLE.jpg>
and
<http://www.rcblue.com/Misc/Japanese_output_with_Courier_New_in_IDLE.jpg>.
(The whole script plus output is at
<http://tutoree7.pastebin.com/xLsRfTSQ>.)

I'd like to know how the IDLE developers did this. How can IDLE not
have a problem with Japanese using Courier New, Calibri, even Fences
or Windings! (For Wingdings, see
<http://www.rcblue.com/Misc/Japanese_and_Wingdings.jpg>.)

Thanks,

Dick Moores
 
Reply With Quote
 
 
 
 
Eric Brunel
Guest
Posts: n/a
 
      02-16-2011
In article <(E-Mail Removed)>,
"Richard D. Moores" <(E-Mail Removed)> wrote:

> I recently wrote some code that prints information about the 'jukugo'
> used in Japanese newspaper articles. A jukugo is a Japanese word
> written with at least 2 kanji. An example of a 2-kanji jukugo is 危機
> (kiki -- crisis). I found that I could not use my usual IDE to render
> the Japanese correctly in either the code or the output. But IDLE
> (version 3.1.2; Windows Vista) does a beautiful job! See screen shots
> <http://www.rcblue.com/Misc/Japanese_in_code_with_Courier_New_in_IDLE.jpg>
> and
> <http://www.rcblue.com/Misc/Japanese_output_with_Courier_New_in_IDLE.jpg>.
> (The whole script plus output is at
> <http://tutoree7.pastebin.com/xLsRfTSQ>.)
>
> I'd like to know how the IDLE developers did this. How can IDLE not
> have a problem with Japanese using Courier New, Calibri, even Fences
> or Windings! (For Wingdings, see
> <http://www.rcblue.com/Misc/Japanese_and_Wingdings.jpg>.)


IDLE doesn't do anything, tk does. When a character is not available in a given font,
tk looks up for one containing it by itself and uses it automatically.

> Thanks,
>
> Dick Moores

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
SWIG/IDLE/Python: F5 SHIP.py works but "import SHIP" gives "ImportError: dynamic module does not define init function (initSHIP)" Bill Davy Python 0 05-12-2005 08:48 AM
IDLE does not start on WinXP George Carman Python 1 08-30-2004 01:11 PM
IDLE does not start on WinXP Snake Python 0 08-28-2004 09:03 PM
Python Program runs but itself but does not run under IDLE Ollie Python 0 10-02-2003 04:05 PM



Advertisments