0

Is there a way to be able to use tkinter instead of Tkinter in Python 2.7.15?

Because I am able to use both syntaxes in my Python2.7 scripts. See Image: 1

As far as I know tkinter is for python3 and Tkinter for python2.

I am not sure how am I able to do this; the Windows 10 system I am working on had Python pre-installed by another engineer. I'd really appreciate if someone can shed light on this and if this is stable or not?

Thanks.

Community
  • 1
  • 1
Komal
  • 17
  • 5

1 Answers1

0

Is it possible to use tkinter (lowercase) in Python 2.7?

Possible? Yes. Recommended? Definitely not.

I am not sure how am I able to do this

When you import any module, python simply looks through a series of directories for a module that matches what you're importing. In your case, it seems that you have python 3 libraries ahead of python 2 libraries in your search path. This will likely lead to unexpected problems.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685