tk

tclstub issue while using homebrew to install graphviz

元气小坏坏 提交于 2019-11-28 01:32:42
问题 Homebrew quits when trying to install graphviz, CCLD libtcldot_builtin.la ld: library not found for -ltclstub8.6 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[4]: *** [libtcldot.la] Error 1 make[4]: *** Waiting for unfinished jobs.... ld: library not found for -ltclstub8.6 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[4]: *** [libtcldot_builtin.la] Error 1 make[3]: *** [install-recursive] Error 1 make[2]: ***

ttk styling “TNotebook.Tab” background and borderwidth not working

我与影子孤独终老i 提交于 2019-11-28 00:41:19
问题 I been playing around with TKinter trying to create a multiple tab window. When I try to style the TNotebook.Tab it ignores the options background and borderwidth , but it acknowledges foreground . What am I doing wrong? Here is the relevant part of the code: COLOR_1 = 'black' COLOR_2 = 'white' COLOR_3 = 'red' COLOR_4 = '#2E2E2E' COLOR_5 = '#8A4B08' COLOR_6 = '#DF7401' #Notebook Style noteStyler = ttk.Style() noteStyler.configure("TNotebook", background=COLOR_1, borderwidth=0) noteStyler

Is it possible to run only a single step of the asyncio event loop

风流意气都作罢 提交于 2019-11-27 18:25:48
问题 I'm working on a simple graphical network application, using asyncio and tkinter. I'm running into the problem of combining the asyncio event loop with Tk's mainloop. If possible, I'd like to do it without threads, because both these libraries (but especially tkinter) aren't very thread safe. Currently, I'm using Tk.update in an asyncio coroutine, which runs only a single iteration of the tk event loop: @asyncio.coroutine def run_tk(tk, interval=0.1): try: while True: tk.update() yield from

How to make a GUI for bash scripts? [closed]

不羁岁月 提交于 2019-11-27 16:59:31
I want to make some graphical dialogs for my script but don't know how. I hear something about GTK-Server or something like that. If someone knows how to link Bash with tcl/tk I also be satisfied. Please do not post something like "change to C++" because my project must be a script in Bash; there are no other options. Any ideas? EDIT: Thanks for answers but I don't want "graphics" as in colors in the console, but graphical windows which I can move, minimize etc. I will test xmessage , but I don't think that will be what I am searching for. EDIT 2: I don't want make a simple dialog like yes/no,

Tkinter: Treeview widget

随声附和 提交于 2019-11-27 16:24:16
问题 At the moment I am working on a program that has its own project files and inside that are like sub-files and I want to know how to use the treeview widget to display all the sub-files inside the project file, Any Ideas? Thanks in advance! 回答1: There is an example in the source code of CPython of how to fill a Treeview recursively with the content of a directory, this is basically how it works (I have removed the event bindings and wrapped it in a class for better readability): import os

Scaling of Tkinter GUI in 4k (3840*2160) resolution?

荒凉一梦 提交于 2019-11-27 15:17:27
I use LinuxMint 17.3 Cinnamon in VirtualBox, 1920*1080 resolution is used in this machine, the Hi-DPI option is turned on. The host machine is Windows 10, with 3840*2160 resolution. Despite turning on Hi-DPI option in LinuxMint, some applications become to look good for comfortable work, in terms of scaling, but python-tk GUI (python2) hasn't been changed - font size is tiny, changing of Font options in Cinnamon doesn't change fonts in tk. Is there any way to scale correctly already written tk GUI applications? Bryan Oakley tkinter has an internal scaling factor that it uses to convert

Steps to Create A Tcl Starkit on a Windows Platform

风格不统一 提交于 2019-11-27 14:49:25
I am trying to figure out the basic steps to creating a Tcl starkit in Windows. I've asked a similar question before, as well as purchased a book on Tcl programming, visited wiki.tcl.tk, emailed Tcl programmers directly, etc... In all, I've received great feed back from my resources and this website; however, I've failed to explain that I am a complete novice when it comes to building batch files, using a command console, and creating directories. I really need someone to basically spell things out for me, because I cannot seem to interpret what anyone is trying to tell me. I think Visual

Tcl/Tk examples?

蹲街弑〆低调 提交于 2019-11-27 11:46:17
问题 Tcl/Tk is a simple way to script small GUIs. Can anyone give a nice example with a button and a text widget. When the button is pressed should a shell command be executed and the output piped to the text widget. If you have other nice and clean examples for useful tasks, please add them too. 回答1: Here's a more complete example using fileevents. This will auto-scroll all the time. For usability purposes you probably only want to auto-scroll if the bottom of the text is visible (ie: if the user

The Simplest Steps to Converting TCL TK to a Stand Alone Application

我与影子孤独终老i 提交于 2019-11-27 10:34:15
问题 After running into major compatitiblity problems with C#, ASP.NET, MS Access, Linux, and Mono, I've decided to program in a language that is cross-platform, open source, and compatible with embedded databases that are also compatible with many platforms. I narrowed my choice down to TCL. Before I began a sample application with TCL, I wanted to see how easy it was to create a stand alone application. I purchased a book entitled "Practical Programming in TCL and TK", downloaded TCLkit, and

Add tkinter's intvar to an integer

我怕爱的太早我们不能终老 提交于 2019-11-27 08:33:31
问题 I'm having some trouble adding a value taken from an Entry box and adding it to an existing number. In this case, I want the value of the "change speed" box to be added to the robots current speed. When run, my code produces an error: TypeError: unsupported operand type(s) for +=: 'int' and 'IntVar'. Below is the code that produces the entry box: change_speed_entry = ttk.Entry(main_frame, width=5) # Entry box for linear speed change_speed_entry.grid() data = tkinter.IntVar() change_speed