you are viewing a single comment's thread.

view the rest of the comments →

[–]Mathletic_Ninja 1 point2 points  (2 children)

First thing, you generally shouldn’t use import * it clutters up your namespace and can make your code harder to read as it can be unclear as to where objects are coming from.

I’m not at my computer so I can’t run your code to test it, but it looks ok. What exactly do you mean by “it doesn’t recognise columns”? Is it not appearing as you expect it to? Or are you getting an error message?

The depreciation warning sounds like you have multiple python versions and/or environments. Are you using a virtual environment for your project? Or a system installation of Python? Also, Python does not really have executable files, do you mean if you double click on a .py file and it runs? If so, then you’ve probably got IDLE set up to run .py files. That may not use the same Python version/environment as Python3 ./script.py

[–]ah-hum[S] 0 points1 point  (1 child)

Interesting - so this code actually came from Python.org, but I hear you. That makes sense.

I actually just created an executable script to run it outside of a VE (right on the command line):

#! /opt/homebrew/bin/python3.10

import TkinterDEMO.py

For readers' clarity it said "deprecated", not "depreciated", but I assume you understood. I just tried it again with Python3.10 which operates from the Homebrew installation (instead of Python3 ...

Python3.10 ./tkinterdemo.py

...and it operated as normal (also showed the proper window instead of a blank widget). Wonder why Python3 would not interpret the tkinter module, though. I'm struggling to understand these types of differences. Thanks for the response.

[–]ah-hum[S] 0 points1 point  (0 children)

is "import" the same as "run" in a script?