[Tutor] Platform Independence in Python

Alan Gauld alan.gauld at btinternet.com
Thu Apr 7 10:13:58 CEST 2011


"Ratna Banjara" <mast.ratna at gmail.com> wrote 

> In windows we should write
> =>import tkinter
> 
> while in linux, we should write
> =>import Tkinter
> 

The difference is not the Operating System but the Python version.
Version 3 has many incompatibilities with version 2. This is one 
of them so it looks like you have v3 on Windows and v2 on Linux.

Either downgrade the Windows version to 2.7 or upgrade Linux to v3.

For production code I'd suggest you downgrade Windows 
to 2.7, v3 is still missing a few important 3rd party libraries

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list