tk

Creating Ruby applications for Windows

落花浮王杯 提交于 2019-12-04 03:41:52
I want to develop a Windows application. Honestly I care little about cross-platforms for now (but still would be good) I want to use Ruby, since it has quite a simple syntax and is so.. well, simple and easy to learn. My application is like a "game level creator", where you can design your own level and then run it with another application which is a "game level player" by reading the project file created by the creator app. You get the idea. Now, I got a new PC and is completely clean. Absolutely no trace of my old Ruby experiments and fails. First of all, I will need to choose a GUI

Should I use Perl/Tk, Tcl::Tk or Tkx for a Perl GUI?

半世苍凉 提交于 2019-12-04 00:33:54
I really like Perl/Tk , but have come to the opinion that it's DOA. I think Tcl::Tk and Tkx are better solutions. Assume I drop Perl/Tk . Is the "most supported" route to go with Tcl::Tk (which hasn't been updated since 2007, and whose author seemingly cannot be reached), or Tkx ? Are either of these actively used/supported? Under the hood both Tcl::Tk and Tkx use the Tcl module as a bridge to Tcl/Tk. The difference is in the API they present to Perl. Tkx was developed by ActiveState, who use it in the GUI for their tools. (e.g. PPM) It's actively used, though it's hard to say how widely. It's

How to change font and size of buttons and frame in tkinter using python?

拟墨画扇 提交于 2019-12-04 00:25:30
This is the code that i used to generate a simple text box and a button in tkinter. What should be the parameters to have a better look of the frame and buttons? root = Tk.Tk() def submit(): query = entry.get() retrieve(query) entry = Tk.Entry(root) entry.pack() button = Tk.Button(root, text='submit', command=submit) button.pack() root.mainloop() UPDATE : The New Mexico Tech tkinter website has been archived on GitHub. First the best reference for Tkinter is this New Mexico Tech website . In the toc you will find a section on fonts , and in the section on Button widgets you'll find the option

Tkinter - logging text in Text Widget

你说的曾经没有我的故事 提交于 2019-12-03 22:44:50
I want to do a class that is able to "log" text in a Text Widget. This class could be used by other applications to send and display logs to the text widget. class TraceConsole(): def __init__(self): # Init the main GUI window self._logFrame = Tk.Frame() self._log = Tk.Text(self._logFrame, wrap=Tk.NONE, setgrid=True) self._scrollb = Tk.Scrollbar(self._logFrame, orient=Tk.VERTICAL) self._scrollb.config(command = self._log.yview) self._log.config(yscrollcommand = self._scrollb.set) # Grid & Pack self._log.grid(column=0, row=0) self._scrollb.grid(column=1, row=0, sticky=Tk.S+Tk.N) self._logFrame

How to update Tcl/Tk in Python?

∥☆過路亽.° 提交于 2019-12-03 22:17:49
Tcl and Tk in their version 8.6 have been out now for about six weeks. However, the files that can be downloaded from Tcl have a different folder structure and lack some files such as tk85.lib (or tk86.lib now) compared to the Tcl folder in Python. My question is: How can Tcl and Tk be updated to 8.6 in Python (including the integration into Tkinter)? The Python version is 2.7 and the operating system is Windows 7. I'm thinking you should report a bug and hope the next 2.7 release will Exist Be linked against the new version of Tk (Assuming you have any real reason to want the new version in

数据库原理(日志系统原理)[转]

被刻印的时光 ゝ 提交于 2019-12-03 21:34:47
ref: https://blog.csdn.net/whyangwanfu/article/details/1926367 事务的原语操作 在事务系统的运行当中,有三个地址空间供元素存储: 磁盘空间 缓冲区 事务的局部地址空间。 一个简单的读、修改X元素操作的流程如:事务到缓冲中读取元素X,如果命中,则读取事务局部地址空间并返回,如果未命中,则先将相关页从磁盘读入缓冲区。事务在它的局部地址空间中修改元素X,然后写入缓冲区,再从缓冲区写入磁盘。当然缓冲区的数据也可能不是立即拷贝入磁盘的,这取决于具体的缓冲区管理策略。 为了便于描述,我们描述了4个操作原语: INPUT(X) :将包含数据库元素X的磁盘块拷贝到内存缓冲区 READ(X,t) :将数据库元素X拷贝到事务的局部变量t。更准确地说,如果包含数据库元素X的块不在内存缓冲区中,则首先执行INPUT(X)。接着将X的值赋给局部变量t。 WRITE(X,t) :将局部变量t的值拷贝到内存缓冲区中的数据库元素X。更准确地说,如果包含数据库元素X的块不在内存缓冲区中,则首先执行INPUT(X)。将着将t的值拷贝到缓冲区中的X。 OUTPUT(X) :将包含X的缓冲区拷贝到回磁盘。 undo日志 如果系统崩溃,恢复管理器就被激活,检查日志以重建数据库的一致性状态。恢复时,有些事务的工作将会重做,它们写到数据库的新值会重写一次

tkinter/py2app created application doesn't show window on initial launch

限于喜欢 提交于 2019-12-03 16:32:53
I'm running into an issue where launching a python app created with Tkinter and packaged by py2app doesn't show the application window immediately. The only way I've gotten the window to show after launch is to click on the application icon in the dock. This guy is using an applescript to auto-click the app on launch but as he states, and I agree, it isn't ideal. After doing some extensive research, it would appear that this is a result of setting the 'argv_emulation' option to True in the, py2app, setup.py file. 来源: https://stackoverflow.com/questions/12992316/tkinter-py2app-created

What does calling Tk() actually do?

故事扮演 提交于 2019-12-03 13:27:23
问题 I was brushing up on Tkinter when I looked upon a minimal example from the NMT Tkinter 8.5 Reference. #!/usr/bin/env python import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.grid() self.createWidgets() def createWidgets(self): self.quitButton = tk.Button(self, text='Quit',command=self.quit) self.quitButton.grid() app = Application() app.master.title('Sample application') app.mainloop() It's all well and good, until I notice

Python embeddable zip: install Tkinter

青春壹個敷衍的年華 提交于 2019-12-03 13:03:23
Python embeddable zip comes without pip and Tkinter. It is easy to install pip with get-pip.py in the embeddable zip. How can we install Tkinter too (assuming we do not have an existing Python installation in the same machine)? Assuming you are on Windows and you also have a regular Python distribution installed (same version of the embedded distribution), to install Tkinter in the embedded distribution you can copy the following files from the regular Python distribution: tcl folder to embedded_distribution_folder\ (root folder of the embedded distribution) tkinter folder (which is under Lib

Re-binding “select all” in Text widget

自闭症网瘾萝莉.ら 提交于 2019-12-03 12:34:59
I'm working with the Text widget and I have an issue about old-school shortcuts that Tk uses. Ie: Select all: Ctrl + / vs Ctrl + a Cut: Ctrl + w vs Ctrl + x Copy: Meta + w vs Ctrl + c Paste: Ctrl + y vs Ctrl + v On Windows, all of them work except Ctrl+a. 1) Is it possible to redirect binds, so .bind('<Control-a>') calls already bound Ctrl + /? 2) I tried for "select all": txt_text.bind('<Control-a>', self.ctext_selectall) Where: def ctext_selectall(self, callback): """Select all text in the text widget""" self.txt_text.tag_add('sel', '1.0', 'end') But it does not work, since Ctrl+a works by