[Tutor] Platform Independence in Python

Steve Willoughby steve at alchemy.com
Thu Apr 7 07:15:54 CEST 2011


On 06-Apr-11 21:39, Ranjith Kumar wrote:
> On Thu, Apr 7, 2011 at 10:04 AM, Ratna Banjara <mast.ratna at gmail.com
> <mailto:mast.ratna at gmail.com>> wrote:
>     In windows we should write
>     =>import tkinter
>
>     while in linux, we should write
>     =>import Tkinter

Actually, you should do the same thing on both platforms.  Are you 
running the same code on both platforms?

The correct name is "Tkinter" (capital T) for Python 2.x,
and "tkinter" (lower-case) for Python 3.x, regardless of platform.

-- 
Steve Willoughby / steve at alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 48A3 2621 E72C 31D9 2928 2E8F 6506 DB29 54F7 0F53


More information about the Tutor mailing list