Saravanan666/pypi-org huggingface dataset:
Package: tkinter-fonts-viewer
tkinter_fonts_viewerGUI application for viewing tkinter fonts. It shows text for specified font. We can switch between font types - all/normal/mono. We can filter fonts, with specified text.Install
########.. code-block:: pythonpip install tkinter_fonts_viewerUsage from python
########.. code-block:: pythonfrom tkinter_fonts_viewer import viewer

viewer()
# calls gui viewer from python.. code-block:: pythonfrom tkinter_fonts_viewer import fonts_type

fonts = fonts_type()
# creates dict with known fonts type (normal/mono)Usage from command line
########.. code-block::fonts_viewerExample application views
########.. image:: views/example_view3.png.. image:: views/example_view4.png.. image:: views/example_view5.pngUpdate/Todo
########07.01.2022resizable windowlistbox widget to choose fonts"text" entry for user input text"example" button with example textauto wrapping text in main label01.06.2020main viewsearch entryfonts type (normal/mono) jsonoldstyle listboxtodo/to considercheckbutton for bold/curve fontsoption for font resizingcolor pickernight moderedesign of top menuenumeration of fonts in listbox
Package: tkinteri
TkinterITkinter扩展组件库特点支持跨平台使用暂时有2个组件（完全实现总共52+组件）安装pipinstalltkinteripython-mtkinteri简介本组件库基于Incr Widgets，
通过Tcl提供的接口使用Incr Widgets进行开发。ButtonBox 按钮盒示例fromtkinterimportTkfromtkinteriimportIButtonboxroot=Tk()bb=IButtonbox()bb.add("OK",text="OK",command=lambda:print("OK"))bb.add("Apply",text="Apply",command=lambda:print("Apply"))bb.add("Cancel",text="Cancel",command=lambda:print("Cancel"))bb.default("OK")bb.pack(fill="both",expand="yes")bb2=ButtonBox(orient="vertical")bb2.add("First",text="First",command=lambda:print("First"))bb2.add("Second",text="Second",command=lambda:print("Second"))bb2.add("Third",text="Third",command=lambda:print("Third"))bb2.insert(2,"Fourth",text="Fourth",command=lambda:print("Fourth"))bb2.default("First")bb2.invoke()bb2.invoke("Second")print("Button-Third`s Index",bb2.index("Third"))bb2.pack(fill="both",expand="yes")root.mainloop()
Package: tkinterie
tkinterIE基于InternetExplorer.Application的WebView组件。使用方法WebView(master,width:int,height:int,url:str='',**kw)'''master::父组件width::初始宽度height::初始高度url::网址或html文件，可以为空**kw::其它Frame参数'''例子：fromtkinterimportTkfromtkinterie.tkinterIEimportWebViewimportclrclr.AddReference('System.Threading')fromSystem.ThreadingimportThread,ApartmentState,ThreadStartdefmain():a=Tk(classname='test tkinterie')a.geometry('1200x700')w=tkinterIE.WebView(a,1200,700,'www.baidu.com')w.pack()a.mainloop()if__name__=='__main__':t=Thread(ThreadStart(main))t.ApartmentState=ApartmentState.STAt.Start()t.Join()tkinter主窗口必须在STA线程模式下运行，防止WebBrowser卡死。方法navigate(url:str)指向一个网址或者是html文件路径。goback()上一页goforward()下一页gosearch()返回默认搜索界面gohome()返回初始界面refresh()刷新当前界面一些绑定事件本部分只作为参考，具体见微软发布的说明文章。defmain():a=Tk()a.geometry('1200x600')w=WebView(a,1200,550,'www.baidu.com')w.pack(side='bottom',fill='both')w.ie.IsWebBrowserContextMenuEnabled=False#禁用快捷键、菜单w.ie.Navigating+=before_navigate#打开新的链接w.ie.NewWindow+=before_window#打开新的窗口a.mainloop()defbefore_navigate(sender,e):#显示新链接print(e.Url)defbefore_window(sender,e):#在本控件打开新窗口a=sender.Document.ActiveElement.GetAttribute("href")sender.Navigate(a)e.Cancel=Trueif__name__=="__main__":t=Thread(ThreadStart(main))t.ApartmentState=ApartmentState.STAt.Start()t.Join()What's new-1.5.0-Bind some method.-1.4.0-Add some example about binding some events of WebBowser in Python.-1.3.0-Use WinForms' WebBrowser, but it must runs in STA thread mode.-1.2.0-WebView will be destroyed when father widget destroys.-1.1.0-WebView can resize itself when father widget's size changes.-1.0.0-Upload to PYPI.
Package: tkinter-kit
TKinter-Kit 📦This project aims to provide a rich set of helpful functions, to easily use the tkinter module, to have a better graphical user interface experienceFeatures 💡It contains functions to easily interact with users as simple as the  print()  and input() functionsIt helps to manage scroll_bar easilyIt helps to have a better experience when printing 2D tablesExamples of use 📝#!/usr/bin/env python3# -*-coding:UTF-8 -*importtkinterastkimporttkinter_kit.funcastkk# We create a main windowwindow=tk.Tk(className=" Test of tkinter_kit")# We create a canvas and a frame to add a vertical scrollbarcanvas=tk.Canvas(window,width=1000,height=830)frame=tk.LabelFrame(canvas,width=1000,height=830,text="Test of tkinter_kit")scrollbar=tkk.frame_vertical_scrollbar(window,canvas,frame)# We create a label to display a messagetkk.print_window(frame,"Welcome to the test of tkinter_kit")# We create an entry to ask the user's namename=tkk.input_window(window,frame,"What is your name?")# We create a label to display the user's nametkk.print_window(frame,"Hello, "+name)tkk.next_button(window,frame,text="Next")# We create a list of data to display a tableHeading=["Name","Age","City"]Datas=[["Alice",25,"Paris"],["Bob",30,"Lyon"],["Charlie",35,"Marseille"]]# We create a label to display the title of the tabletkk.print_window(frame,"Here is a table of data")# We create a table to display the datatkk.print_table_windows(frame,Heading,Datas)# We create a list of possible answersRESPONSES=["Yes","No","Maybe"]# We create a label to display a questiontkk.print_window(frame,"Do you like Python?")# We create radio buttons to display the possible answersvalue=tk.StringVar()button1=tk.Radiobutton(frame,text="Yes",variable=value,value=RESPONSES[0])button2=tk.Radiobutton(frame,text="No",variable=value,value=RESPONSES[1])button3=tk.Radiobutton(frame,text="Maybe",variable=value,value=RESPONSES[2])button1.pack()button2.pack()button3.pack()# We create a button to validate the answertkk.next_button(window,frame,text="Validate")# We create a label to display the user's answertkk.print_window(frame,"You answered: "+value.get())# We create a button to quit the windowtkk.leave_window(window,frame,text="Quit")We obtain this result :Author ✍️This project was created by KpihX. You can contact me atkapoivha@gmail.comfor any questions or suggestions.License 📄This project is licensed under the MIT license - see the LICENSE file for more details.:https://github.com/KpihX
Package: tkinter-layout-helpers
Tkinter Layout HelpersA library which is intended to simplify a placement of widgets with.grid()and.pack()methods:avoid manual calculation of indices of columns and rows when you add a widget;avoid typing-in some common parameters (likesticky=tk.EW) each time you add a widget;and more...Work in progress.As an example, this code:importtkinterastkfromtkinter_layout_helpers.grid_helperimportgrid_managerroot=tk.Tk()withgrid_manager(root,sticky=tk.EW)asgrid:grid.new_row()\.add(tk.Label(text="0",width=20))\.add(tk.Label(text="1",width=20))\.add(tk.Label(text="2",width=20))\.add(tk.Label(text="3",width=20))\.add(tk.Label(text="4",width=20))grid.new_row().add(tk.Entry()).column_span(4).add(tk.Entry()).column_span(1)grid.new_row().add(tk.Entry()).column_span(3).add(tk.Entry()).column_span(2)grid.new_row().add(tk.Entry()).column_span(2).add(tk.Entry()).column_span(3)grid.new_row().add(tk.Entry()).column_span(1).add(tk.Entry()).column_span(4)grid.columnconfigure(0,weight=1)grid.columnconfigure(1,weight=1)grid.columnconfigure(2,weight=1)grid.columnconfigure(3,weight=1)grid.columnconfigure(4,weight=1)root.mainloop()Gives the following result:More examples see here:examples
Package: tkinter-map
Tkmap widgetEfficient web map canvas for tkinter.Support this projectInstallVersion 0.1python-mpipinstalltkinter-mapDeveloppment versionpython-mpipinstallgit+https://github.com/Moustikitos/tkinter-map.git@masterRequirementIf you plan to useTkmapwidget with map providers sending JPEG-based tiles,
it is recommended to install thetclpackagetkimg. Binaries can be extracted
in.tcldirectory at the root oftkmappackage (ie the one containing the__init__.pymodule).Use>>>fromtkmapimportwidget,model>>>canvas=widget.Tkmap()>>>canvas.pack(fill="both",expand=True)>>>canvas.open(model.OpenStreetMap(),zoom=10,location=(48.645272,1.841411))FeaturesTile set:Google mapGoogle satelliteOpen Street mapMapbox satelliteCustom mapZoom, pan and fast pan mouse actionLatitude longitude pixel locationTile cachingOngoing workLocation format and projection
Package: tkintermd
tkintermdA Markdown editor with HTML preview for use in tkinter projects.Explore the docsDownload the docsPyPiIssuesAbout The ProjectAn embeddable tkinter based Markdown editor with HTML preview. The editor has
syntax highlighting provided byPygmentsand the HTML preview window is
provided bytkinterweb.Github v0.1.0 Project:Github Project - tkintermd v0.1.0Github Discussion:Github DiscussionsPyPi Link:https://pypi.org/project/tkintermd/PDF Documentation:https://hreikin.github.io/tkintermd/pdf/tkintermd-documentation-LATEST.pdfBuilt WithPygmentsPymdownxPythonPython MarkdowntkintertkinterwebGetting StartedInstallationTo get a local copy up and running choose one of the below install instructions
and follow the steps provided.Install With PIPThe simplest way to installtkintermdis to usepip:pipinstalltkintermdInstall From SourceAlternatively you can install from source by following the steps below:Clone the repo:gitclonehttps://github.com/hreikin/tkintermd.gitcdtkintermd/Create and source a Python virtual environment:python3-mvenv.venvsource.venv/bin/activateInstall requirements withpip:pipinstall-rrequirements.txtUsageEmbeddedTo use theTkintermdFramein one of your own python scripts:fromtkintermd.frameimportTkintermdFrameimporttkinterastkfromtkinter.constantsimport*root=tk.Tk()app=TkintermdFrame(root)app.pack(fill="both",expand=1)app.mainloop()For more examples, please refer to theDocumentationRoadmapCheck out theGithub Project - tkintermd v0.1.0for an overview of the work being done towards the release. See theopen issuesfor a full list of proposed features (and known issues).ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.ContactGithub Link:https://github.com/hreikin/tkintermdPyPi Link:https://pypi.org/project/tkintermd/Documentation:https://hreikin.github.io/tkintermd/
Package: tkinter-msgcat
cipypiqatkinter-msgcatCreate multilingual interfaces for your tkinter applications.tkinter-msgcat leverages Tk's msgcat to provide a per-instance message catalog
which holds all the translations, while allowing them to be kept in separate
files away from code.⏬ Installationtkinter-msgcat requires Python 3.7+pip install tkinter-msgcat✨ Getting StartedFor storing the translation files I recommend this folder hierarchy:project (or src/project)
  ├── __init__.py
  └── msgs
      ├── __init__.py
      ├── hi.msg
      └── mr.msgThis layout is recommended byTcl.Add some translations in the.msgfiles, in this casehi.msg:::msgcat::mcsethi"Hello""नमस्ते"Create a Tkinter windowor instance, technically.Let's put tkinter-msgcat into action!frompathlibimportPathfromtkmsgcatimport*msgsdir=Path(__file__).parent/"msgs"load(msgsdir)locale("hi")get("Hello")# "नमस्ते" 🥳🤝 ContributingAll contributions are welcome and acknowledged.
Please read thecontributor's guide.© LicenseThe code in this project is released under the3-Clause BSD License.
Package: tkinter-nav
Tkinter-navLightweight navigation wrapper for Tkinter.Installpip install tkinter-navUsageCreate Some Pagesimporttkinterastkimporttkinter_navastknavclassPageOne(tknav.Page):def__init__(self,parent):tknav.Page.__init__(self,parent,'name_of_page')# Use as any Frame# Page extends tk.Frametk.Button(self,...).pack()defpage_did_mount(self):...defpage_did_unmount(self):...classPageTwo(tknav.Page):...classPageThree(tknav.Page):...Create your App...classApp(tknav.Wrapper):def__init__(self):pages=[PageOne,PageTwo]tknav.Wrapper.__init__(self,# Your pagespages=pages,# Set inital state, not requiredstart_state={'foo':'bar'})# Use as any Tk instance# tknav.Wrapper extends tk.Tkself.geometry('200x200')self.title('My Nav App')# Show pageself.show_page('page_one')# Runif__main__=='__main__':App().mainloop()PagesNavigate Between PagesFrom theconstructorclassPageOne(tknav.Page):def__init__(self,parent):...tk.Button(command=lambda:self.navigate('page_two')).pack()From ahandlerfunctionclassPageOne(tknav.Page):...defhandleClick(self):self.navigate('page_two')Mount and Unmountpage_did_mount: When the page is shownpage_did_unmount: When the page is hiddenNote:You do not have to use them. They will be defined with a pass statement.classSomePage(tknav.Page):...defpage_did_mount(self):print('Page did mount')defpage_did_unmount(self):print('Page did unmount')Note:If you are familiar with React, they share the same role as ComponentDidMount and ComponentDidUnmount.StateYou can set a global state for your app which will enable you to share data between pages.classApp(tknav.Nav):def__init__(self):...self.app_state={'foo':'bar'}classPageOne(tknav.Page):...deffunction(self):# get a valueprint(self.app_state['foo'])#bar# set a new valueself.app_state['bar']='foo'When navigate() is called, the local state is merged with the global state.classPageTwo(tknav.Page):...deffunction(self):print(self.app_state['bar'])#fooNote:If you are familiar with React, same principle.ExampleIs thisexample, we navigated frompage_onetopage_twotopage_oneagain. The state is printed in page_did_mount() and changed in page_did_unmount().
Package: tkinterplus
TkinterplusTkinterplus is a python UI library that adds more widgets to TkinterInstallationInstall the module with pip:pip3 install tkinterplusUpdate existing installation:pip3 install tkinterplus --upgradeRequirementsNameDescriptionUseagePillowThe Python Imaging Library adds image processing capabilities to your Python interpreter.pygamepygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python.cross platform sound mixerDocumentationYou can find the docs for this library on the Wiki tab:DocumentationContributingHave an idea or already created a new Tkinter widget? Create a pull request to add it to this library!
Package: tkinterquickhelper
tkinterquickhelperThis modules implements a couple of custom windows withtkinter.
The main one is a way to create a form which contains an entry for
each arguments of a function and populates them with default
values if any.GitHub/tkinterquickhelperdocumentationBlogHistorycurrent - 2021-01-01 - 0.00Mb0.0.0 - 2021-01-01 - 0.00Mb2: modification to let pyquickhelper uses this module as a replacement for the command line (2018-12-31)1: rename flake8 into code_stype (2018-04-14)
Package: tkintertable
DescriptionThis package allows interactive spreadsheet-style tables to be added into a Tkinter application.
Tkinter is the standard GUI toolkit for Python. A sample application using these classes
is included in the distribution. Now works with Python 3. A sample application using these classes is included in the distribution.InstallationFrom pypi:pip install tkintertableFrom github:pip install -e git+https://github.com/dmnfarrell/tkintertable.git#egg=tkintertableYou can clone the current source using:git clone https://github.com/dmnfarrell/tkintertable.gitUsageImport:from tkintertable import TableCanvas, TableModelCreate table:tframe = Frame(master)
tframe.pack()
table = TableCanvas(tframe)
table.show()Constructor options:table = TableCanvas(frame, model,
                    cellwidth=60, cellbackgr='#e3f698',
                    thefont=('Arial',12),rowheight=18, rowheaderwidth=30,
                    rowselectedcolor='yellow', editable=True)LinksSeehttps://github.com/dmnfarrell/tkintertable/wikifor help.
Package: tkintertools
tkintertoolstkintertools是tkinter的一个辅助开发模块tkintertoolsis an auxiliary development module oftkinterInstall - 模块安装Stable Release - 稳定版本Version - 最新版本 :2.6.21Release - 发布日期 : 2024/01/01Feature - 更新内容 :News-2.6.21pip install tkintertools==2.6.21Pre Release - 预发布版本Version - 最新版本 :3.0.0.dev5Release - 发布日期 :Feature - 更新内容 :News-3.0.0(pre)ℹ️Note - 注意It is not recommended that you use the pre-release version directly for formal development, but it is recommended that you use the pre-release version to experience the new features and to report certain issues that you find.不推荐你直接使用预发布版本进行正式开发，但推荐使用预发布版本来体验新功能，并上报发现的某些问题。More - 更多Tutorials & Documents - 教程和文档 :T&DLicense - 项目证书 :LICENSE.txtChangeLog - 更新日志 :CHANGELOG.mdContribution Guide - 贡献指南 :CONTRIBUTING.mdMirrors - 镜像源 :GitHub|Gitee
Package: tkinter-tooltip
tkinter-tooltipWhat this isThis is a simple yet fully customisable tooltip/pop-up implementation fortkinterwidgets. It is capable of fully integrating with customtkinterthemes both light and dark ones.Featuresnormal tooltipsshow tooltip withssecondsdelaytooltip tracks mouse cursortooltip displays strings and string returning functionsfully customisable, tooltip inherits underlying theme styleInstallpipinstalltkinter-tooltipExamplesNormal tooltipsBy default the tooltip activates when entering and/or moving in the widget are
and deactivates when leaving and/or pressing any button.importtkinterastkimporttkinter.ttkasttkfromtktooltipimportToolTipapp=tk.Tk()b=ttk.Button(app,text="Button")b.pack()ToolTip(b,msg="Hover info")app.mainloop()Delayed tooltipimporttkinterastkimporttkinter.ttkasttkfromtktooltipimportToolTipapp=tk.Tk()b=ttk.Button(app,text="Button")b.pack()ToolTip(b,msg="Hover info",delay=2.0)# True by defaultapp.mainloop()Tracking tooltipHave the tooltip follow the mousse cursor around when moving.importtkinterastkimporttkinter.ttkasttkfromtktooltipimportToolTipapp=tk.Tk()b=ttk.Button(app,text="Button")b.pack()ToolTip(b,msg="Hover info",follow=True)# True by defaultapp.mainloop()Function as tooltipHere the tooltip returns the value oftime.asctime()which updates with every
movement. You can control the refresh rate of theToolTipthrough therefreshargument by default it is set to1s.importtimeimporttkinterastkimporttkinter.ttkasttkfromtktooltipimportToolTipapp=tk.Tk()b=ttk.Button(app,text="Button")b.pack()# NOTE: pass the function itself not the return valueToolTip(b,msg=time.asctime,delay=0)app.mainloop()Themed tooltiptkinter-tooltipis fully aware of the underlying theme (in this case a dark theme),
and can even be furher customised by passingtkstyling arguments to the tooltipStyle tooltip and underlying the button. If a full theme has been used then
theToolTipwill inherit the settings of the theme by default.importtkinterastkimporttkinter.ttkasttkfromtktooltipimportToolTipapp=tk.Tk()s=ttk.Style()s.configure("custom.TButton",foreground="#ffffff",background="#1c1c1c")b=ttk.Button(app,text="Button",style="custom.TButton")b.pack()ToolTip(b,msg="Hover info",delay=0,parent_kwargs={"bg":"black","padx":5,"pady":5},fg="#ffffff",bg="#1c1c1c",padx=10,pady=10)app.mainloop()NotesCertain options do not match great with each other, a good example isfollowanddelayusing small x/y offsets. This can cause the tooltip to appear
inside the widget. Hovering over the tooltip will cause it to disappear and
reappear, in a new position, potentially again inside the widget.ContributingYou can find the instructions on how to contribute in this project in theCONTRIBUTING.mdfile.Acknowledgementstkinter-tooltipis based on the original work performed byTucker Becklicensed under an MIT License.LicenseMITLicense
Package: tkintertoy
TkintertoyTkintertoy was designed to be a easy to use GUI library based on Tkinter.
It was intended for novice programmers to develop GUIs with as little trouble as possible. However, more advanced programmers can reach the more complex features
of Tkinter easily. Here is a short example:from tkintertoy import Window
# create the window
gui = Window()
gui.setTitle('My First Tkintertoy GUI!')
# add the widgets
gui.addEntry('name', 'Type in your name')
gui.addLabel('welcome', 'Welcome message')
gui.addButton('commands')
# plot the widgets
gui.plotxy('name', 0, 0)
gui.plotxy('welcome', 0, 1)
gui.plotxy('commands', 0, 2, pady=10)
# start the event processing loop
while True:
    gui.waitforUser()
    if gui.content:
        gui.set('welcome', 'Welcome ' + gui.get('name'))
    else:
        breakThis code will create a small window with an entry, label, and command button
widgets. The application will wait for the user to type in their first name.
After typing it in, and clicking on Ok, the application will display a welcome
label. The user exits the code by clicking on Cancel.As you can see in order to create a simple GUI, you create a window, add widgets,
plot the widgets in the desired location, and then call waitforUser.While Tkintertoy was designed to be an GUI library for simple interfaces it
has been used in more complex code as well.Using Tkintertoy, it is hoped that Python instructors can quickly move students
from boring command-line applications to useful standard GUIs. A tutorial with
many useful examples in included with the documentation.
Package: tkinteruserinput
Pop-ups to get input from the user - tkinterpip install tkinteruserinputTested against Windows 10 / Python 3.10 / Anacondafromtkinteruserinputimportget_user_input,get_user_input_varbuttons,get_user_input_checkbox,get_user_input_radio,\show_info,show_error,show_warningif__name__=='__main__':################################################user_input=get_user_input(linesinputbox=1,size="300x150",title="Input Box Example",textabovebox="Enter your text below:",submitbutton="Submit",regexcheck=r"\d+",showerror=("Error","This is not a number! Try again!"),showinfo=None,showwarning=None,icon=r"C:\Users\hansc\Pictures\regiondf.ico",)print("User input:",user_input)################################################options=["Option 1","Option 2","Option 3"]user_input=get_user_input_varbuttons(options=options,size="300x350",title="Your input",textabovebox="Click a button",buttonwidth=15,buttonheight=3,icon=r"C:\Users\hansc\Pictures\regiondf.ico")print("User input:",user_input)################################################user_input=get_user_input_checkbox(checkbox_options=("Option 1","Option 2","Option 3","Option 4"),size="300x350",title="Your input",textabovebox="Select checkboxes:",submitbutton="Submit",icon=r"C:\Users\hansc\Pictures\regiondf.ico")print("User input:",user_input)################################################user_input=get_user_input_radio(radio_options=("Option 1","Option 2","Option 3","Option 4"),indexdefault=0,size="300x350",title="Your input",textabovebox="Select a radio button",submitbutton="Submit",icon=r"C:\Users\hansc\Pictures\regiondf.ico")print("User input:",user_input)################################################show_info("Titel","Message")show_error("Titel","Message")show_warning("Titel","Message")