Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UI framework?
#11
If you installed Python on Windows, you probably have 'pythonwin' installed as well, under 'site-packages'. This is like the command line interpreter but better, which has code completion. Not as powerful as an IDE, but better than the command line, with no additional software to install.

Visual Studio is like most Microsoft solutions in that it is big and clunky and almost impossible to completely remove. It is great if you program in multiple languages, but overkill if your only interested in one.

Quote:how do you know what methods (events/actions/not sure) apply to a widget or variable? 

The best way is to read the documentation.

Quote:I've been through a bunch of them (to the point that my PC has had to be re imaged from all the residual crap that gets left behind after uninstalls)

There will always be residual directories/files (in Linux think 'orphans'). However, these result in minor disk usage, so if you had to re-image a disk, it sounds like you had or have bigger problems.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#12
(Sep-21-2017, 01:16 PM)JP_ROMANO Wrote: I get
Python 3.5.1 |Anacondea 4.0.0 (64 bit)

in Sublime Text 3, when I run this
import tkinter as Tk
root = Tk()

I get
TypeError: 'module' object is not callable

tkinter is the name of the module.
import tkinter as Tk you're importing the module, and renaming it Tk for convenience.
Tk is now the module. Modules are never callable. Anything within that module would need to be accessed via dot notation.

So, instead of root = Tk(), try root = Tk.Tk(). That'll refer to the class Tk within the module tkinter which is being aliased as Tk.

You mentioned StringVar before. That'd also be available through the module:
>>> import tkinter as Tk
>>> root = Tk.Tk()
>>> var = Tk.StringVar()
>>> var
<tkinter.StringVar object at 0x010A5670>
>>>
Reply
#13
Nilamo - my apologies - I thought I had posted a THANK YOU for your helpful response, but it seems I didn't.

With the help I got here, I was able to actually build a small python script with a user friendly UI, connection to a SQL db table, and convert to an .exe -- the end users are testing it now and if successful, will be distributed to more of my colleagues.

Thank you again!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020