Comments (2)
Well, the thing is that I really hate star imports in Python. It's almost always a bad and lazy thing to do. It bloats the global namespace, and makes the code less readable.
Line 1 in 228e7da
I deliberately made such imports impossible, to prevent people from making such bad things while using Tukaan. I wouldn't recommend anyone to do star imports, especially with Tkinter, as you mentioned.
In tkinter you have two different widget sets, and if you do
from tkinter import *
from tkinter.ttk import *
then how do you know, which widget comes from which widget set? Therefore I really recommend everyone to do this instead, where you can use both plain tk and themed widgets.
import tkinter as tk # So it's short, and you don't have to type too much
from tkinter import ttk # Get themed widgets as well
window = tk.Tk()
non_themed_btn = tk.Button(window)
themed_btn = ttk.Button(window)
If you know the Zen of Python you know, that Explicit is better than implicit
and that readability counts
, and star imports provide neither of those.
I'm currently on a touch device, so explaining this is kinda a pain for me, but here's a great post that explains it.
Anyways I'd stick with import tukaan
and from tukaan import SomeThing
, it isn't that exhaustive.
from tukaan.
@rdbende Understood and noted. Thanks for the advice by the way
from tukaan.
Related Issues (20)
- Add multiple monitor support HOT 1
- Rewrite bindings HOT 9
- Localization HOT 2
- Accessibility
- High DPI support HOT 2
- Upload to pypi soon HOT 3
- `ButtonGroup` widget
- `LabeledView` widget
- Add DBus API HOT 1
- There are too many files HOT 1
- `tkinter` widget support HOT 3
- Font support for Labels HOT 9
- Create MenuBars HOT 7
- Create DockMenu HOT 10
- Improve tooltip HOT 2
- Improve `TabView` HOT 5
- Move tkdnd to Dropp submodule HOT 8
- AttributeError: partially initialized module 'tukaan' has no attribute 'App' (most likely due to a circular import) HOT 1
- tukaan.exceptions.TclError: Serif: Unsupported platform windows-x64 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tukaan.