Saravanan666/pypi-org huggingface dataset:
Package: tktabl
tktablThis proyect intends to be a complement on managing tables within the Python Tkinter GUI.InstallationRun the following to install:$pipinstalltktablUsageImportAs tktable is a complement to tkinter, you must import it in your code:importtkinterastkimporttktablCreate a tableCreating a table requires a tkinter root as an argument. This will create a
default 5x4 table in its own tkinter frame.
Note that the first row is a column headers row.root=tk.Tk()table=tktable.Table(root)table.pack()You can specify it size passing 2 additional arguments (col, row), e.g.:root=tk.Tk()table=tktable.Table(root,col=3,row=5)table.pack()This will create a 6x3 table where the first row is a column headers row.You can pass a list of strings as column headers, e.g.:headers=["ID","Name","Age"]root=tk.Tk()table=tktable.Table(root,headers=headers)table.pack()This will create a 5x3 table where the first row is the column headers row
with the values "ID", "Name", and "Age" respectivelyYou can pass a list of dictionaries with the data you want to display, e.g.:data=[{"ID":1,"Name":"Juan","Age":24},{"ID":2,"Address":"5th 20-22"}]root=tk.Tk()table=tktable.Table(root,data=data)table.pack()Note that not every dictionary has the same keys.
This, will create a 4x3 table.
First row will be a row with headers "ID", "Name", "Age" and "Address".
Second row will be the data of the first dictionary.
Third row will be the data of the second dictionary.
(If the dictionary doesn't has any value in a given header, the corresponding
cell will be left blank)Finally, you can mix all these arguments, e.g.:...table=tktable.Table(root,row=5,headers=headers,data=data)table.pack()In this case, it will create a table where there will be as many columns
as headers in the headers variable plus the data variable without repeating themselvesAfter creating the table and before running your app, you must pack it with the Table.pack() function.Usefull methodsTable.get_cell(row, column): will return a Cell object in the corresponding
row and column.Table.get_data(): will return a list of dictionaries, as many as rows are in the table, ignoring
headers row, and each dictionary will have as many named keys as columns are in the table.Table.get_row_data(row): will return a dictionary with as many keys as columns are in the table and
with values corresponding the number of row passed as argument (Row 0 is the first rowafterthe
header row)Cell.get_value(): will return the value displayed by the cellCell.set_value(value): Cell will display the value passed as argumentSome featuresSimple left click on a cell will highlight it.
Double left click will highlight its row.
Triple left click will highlight its column.Work in progress...Changelogv 0.2.0[02/28/2021]: The table includes its own tkinter frame master. Added set and get data functions.
Package: tktable
tktabletktableis a Python library designed to simplify the creation of beautiful tables in Tkinter GUI applications.IntroductionDevelopers using Tkinter often find creating tables natively to be challenging and time-consuming. Importingttk.TreeViewand writing numerous lines of unnecessary code is a common frustration.tktableoffers a solution, allowing you to create attractive tables with just a few lines of code, enhancing the simplicity and ease of Python development.InstallationInstallingtktableis straightforward. Simply execute the following pip command:pipinstalltktableUsageUsingtktableis intuitive and requires just a few steps.Step 1Import theTableclass from thetktablepackage:fromtktableimportTableStep 2Create an instance of theTableclass and provide the necessary arguments:table_headers=("Name","Age","Email")mytable=Table(root,table_headers)mytable.pack()Step 3Insert rows into the created table:row1=("Jack",12,"jack@gmail.com")mytable.insert_row(row1)row2=("John",15,"john@gmail.com")mytable.insert_row(row2)Customization OptionsEnhance the appearance of your table by customizing it with optional arguments in theTableclass constructor.For example, to make the headers bold:mytable=Table(root,table_headers,headings_bold=True)Adjust column width:mytable=Table(root,table_headers,col_width=100)Change the font size of the table content:mytable=Table(root,table_headers,font_size=12)Modify the font face of the table content:mytable=Table(root,table_headers,font_face="Times New Roman")Stay tuned for additional customization options in future releases!Sample ApplicationimporttkinterastkfromtktableimportTableroot=tk.Tk()root.geometry("800x400")table_headers=("Name","Age","Email")mytable=Table(root,table_headers,col_width=150,headings_bold=True)mytable.pack(pady=100)row=("Nitin",18,"ngarg@mail.com")mytable.insert_row(row)root.mainloop()ContributionsCurrently, the module's source code is not open-source. After publishing 2-3 more releases, we plan to open-source it. Stay tuned for updates!Developer InfoDeveloped with great love byNitin Garg.Check out myGitHubfor more exciting projects!Thank you!
Package: tktelerik
tktelerik来自WinForms界面扩展库做出来的组件Telerik原项目需要付费使用，请谨慎使用
依赖，需下载Telerik主程序，也可以# 基础示例1importtktelerikfromtkinterimportTkroot=Tk()theme1=tktelerik.FluentDark()button=tktelerik.Button(text="button1")button.configure(theme="FluentDark")button.pack(fill="both",expand="yes",padx=5,pady=5)root.mainloop()# 基础示例2importtktelerikfromtkinterimportTkroot=Tk()theme1=tktelerik.FluentDark()list1=tktelerik.ListBox()list1.configure(theme="FluentDark")forindexinrange(4):list1.add(list1.create_label("item"+str(index+1)))list1.pack(fill="both",expand="yes",padx=5,pady=5)root.mainloop()# 高级示例1importtktelerikfromtkinterimportTkroot=Tk()theme1=tktelerik.FluentDark()ribbon=tktelerik.RibbonBar()ribbon_quick_item=tktelerik.RibbonButton()ribbon_quick_item.onclick(lambda:print("click ribbon_quick_button"))ribbon.add_item(ribbon_quick_item)ribbon_tab=tktelerik.RibbonTabbed()ribbon_group=tktelerik.RibbonGroup()ribbon_button=tktelerik.RibbonButton()ribbon_button.onclick(lambda:print("click ribbon_button"))ribbon_button.configure(anchor="w")ribbon_textbox=tktelerik.RibbonTextBox()ribbon_textbox.configure(anchor="w")ribbon_group.add(ribbon_button)ribbon_group.add(ribbon_textbox)ribbon_tab.add(ribbon_group)ribbon.add(ribbon_tab)ribbon.configure(theme="FluentDark")ribbon.pack(fill="both",expand="yes",padx=5,pady=5)root.mainloop()# 高级示例2# 如电脑配置不高，请不要高频率点击移动，否则容易卡死importtktelerikfromtkinterimportTkroot=Tk()theme1=tktelerik.Windows11()nav=tktelerik.NavigationView()nav.configure(theme="Windows11")controls=tktelerik.PageViewPage(nav=nav)controls.configure(text="controls")button1=tktelerik.Button(controls.frame())button1.configure(theme="Windows11",text_anchor_ment="w")button1.pack(fill="x",padx=10,pady=10)textbox1=tktelerik.TextBox(controls.frame())textbox1.configure(theme="Windows11")textbox1.pack(fill="x",padx=10,pady=10)textbox2=tktelerik.TextBox(controls.frame())textbox2.configure(multiline=True,theme="Windows11")textbox2.pack(fill="both",ipady=50,padx=10,pady=10)nav.add_page(controls)nav.pack(fill="both",expand="yes")root.mainloop()
Package: tkterm
TkTerm - Tkinter Terminal EmulatorA fully functional terminal emulator built on Tkinter library - perform all basic commands of a terminalUnder the hood it executes commands using Python'ssubprocessmodule and spawn as a thread. PressingCtrl-Cwill terminate current running command. Supports Unix shells (shandbash) and Window's Command Prompt (cmd.exe) commands.FeaturesCompatible with Windows and Unix systemsTabbed Terminal -click & dragto reorder,middle-clickto close tab,double-clickto renameReturn Code (RC) of previous run commands is shown at the bottom status barSettings to customise colours, font and cursor shapeCtrl-Cto kill current running processCtrl-Fto search; supports case sensitivity and regex searchesUPandDOWNarrow keys to cycle between next and previous commands in historyUnix-liketab completionon files and directoriesHandlesmultiline commandsusing caret character^or\RequirementsThe Tkinter GUI library is built into Python, so no 3rd party library is required.Requires at least Python version 3.x and above.InstallationGet it from Github or PIP package manager# From githubgitclonehttps://github.com/dhanoosu/TkTerm.git# From package managerpipinstalltktermStandalone usageNavigate to downloaded folder and run script withcdTkTerm# Either of these will workpythontkterm
pythontkterm/tkterm.pyIf package was installed via pippython-mtktermIntegration with other Tkinter applicationThe Terminal is implemented as aFramewidget and can easily be integrated to other Tkinter application byimporttkinterastkfromtkinterimport*fromtktermimportTerminalroot=tk.Tk()terminal=Terminal(root)terminal.pack(fill=BOTH,expand=True)root.mainloop()If downloaded via github append to system path before importimportsyssys.path.insert(0,"./TkTerm")fromtktermimportTerminalCustomisation optionsCustomise Terminal interface byRight-click > Settings...Note:ClickingSave configsaves setting configuration to a file.Tkterm will automatically load this file the next time it starts up.Multiline commandLong lines of command can be broken up using a caret. A caret at the line end appends the next line command with the current command.
In Windows the caret is^, and UNIX is\.For multiline command to be considered there must benotrailing space after the caret, for example:$> ping ^is considered$> ping ^isnotconsidered$>>echoI^
>haveapple^
>andbanana
IhaveappleandbananaAuthorDeveloped by Dhanoo SurasarangGithub:@dhanoosuLinksGitHub:https://github.com/dhanoosu/TkTerm
Package: tktermwidget
TkTerminal🌏简体中文TkTerminalis a terminal emulator written in Python using tkinter. It is quite easy to use.WindowsMacOSFeaturesUser can set the terminal widget with their own optionsUse \ to make new lines (On Windows it is &&)Command history recorderStylesAnd some onFuture ideasHighlightStylestkterminalwidgetalso have some styles to use such asPowershellCommand:Installation:pip install tktermwidgetExample:fromtkinterimportTkfromtktermimportTerminal# Create root windowroot=Tk()# Hide root window during initializationroot.withdraw()# Set titleroot.title("Terminal")# Create terminalterm=Terminal(root)term.pack(expand=True,fill="both")# Set minimum size and center app# Update widgets so minimum size is accurateroot.update_idletasks()# Get minimum sizeminimum_width:int=root.winfo_reqwidth()minimum_height:int=root.winfo_reqheight()# Get center of screen based on minimum sizex_coords=int(root.winfo_screenwidth()/2-minimum_width/2)y_coords=int(root.wm_maxsize()[1]/2-minimum_height/2)# Place app and make the minimum size the actual minimum size (non-infringable)root.geometry(f"{minimum_width}x{minimum_height}+{x_coords}+{y_coords}")root.wm_minsize(minimum_width,minimum_height)# Show root windowroot.deiconify()# Start mainlooproot.mainloop()
Package: tktextext
Moduletktextextprovides classesEnhancedTextandTextFrame.EnhancedTextis subclass oftkinter.Textand addspossibility to make text read-only but keep text selectableseveral movement and editing aids (smart-tab, smart-home, etc)several useful helper methods.TextFrameis subclass oftkinter.ttk.Frameand can decorateTextFrame(ortkinter.Text) with scrollbars and line numbers margin.The module was initially developed forThonny,
Python IDE for beginners
Package: tkTimePicker
tkTimePickerThis is a simple and fully customizable timepicker widgets made for tkinter. You can make use of
three types of timepicker:clock timepickerold-spin timepickermodern-spin timepickerquick exampleimporttkinterastkfromtktimepickerimportAnalogPicker,AnalogThemes# note: you can also make use of mouse wheel or keyboard to scroll or enter the spin timepickerroot=tk.Tk()time_picker=AnalogPicker(root)time_picker.pack(expand=True,fill="both")# theme = AnalogThemes(time_picker)# theme.setDracula()root.mainloop()For more examples referExamples,
For documentation readDocumentationClock time pickerAvailable themes:NavyBlueDraculapurpleOld-spin timepickerModern-spin timepickerNote: you can also use mouse wheel to change the time when using modern timepicker,
or you can also make use of keypress to change time if you hover over the timepicker.Note: You can also have your own colors besides this. you can also make use of 24 hrs clock, read the
documentation for more info.Other libraries you might be interested intkvideoplayer- Plays video files in tkinter.tkstylesheet- Helps you style your tkinter application using stylesheets.PyCollision- Helps you draw hitboxes for 2d games.
Package: tktimer
tktimertktimeris a set of tkinter widgets including a Stopwatch widget and a Countdown widget.Installing$pipinstalltktimerUsageThe timers have two methods:start()andpause().You can find example programs inexamples/.Available options:optiondescriptiondefaultparentset the parent widget.prefixset text before timer value.""suffixset text after timer value.""unitset the unit (available:second,minute,hour,day,week,year).secondbeginningset starting point (in seconds). specific toCountdown.10update_everyset updating time every X milliseconds.10precisionset counting precision (number of digits after the decimal point).2offsetset time offset (in seconds). specific toStopwatch.10FAQHow can I continue the timer after restarting my app?You can get the elapsed time (in seconds) withtimer.value.get()on exit and setoffsetlater on, which will make the timer start counting fromoffset. ForCountdown, tweakbeginninginstead ofoffset.I'm not happy with how my timer looks like. Can I change its appearance?Yes, timers are ultimately just tkinter labels which means you can do anything you would to an ordinarytkinter.Label.LicensingLicensed under theMIT License. For details, seeLICENSE.
Package: tktk
tktk介绍tkinter的增强控件，将tkinter的基础控件进行封装，给予更强大的控件功能，所有控件继承于LabelFrame进行封装，使用方法和普通控件没什么区别；🛠pypigitee软件架构软件架构说明安装教程pip install git+https://gitee.com/w-8/tktk.gitpip install tktkxxxx使用说明importtkinterastkimporttktkif__name__=="__main__":win=tk.Tk()xe=tktk.LogFrame(win)xe.grid(column=0,row=0,sticky="WNSE")win.columnconfigure(0,weight=1)tk.Button(win,text="Insert1",command=lambda:xe.m_Gui_LogInsert("233")).grid(column=0,row=1,sticky='WNSE')tk.Button(win,text="Insert2",command=lambda:xe.m_Gui_LogInsert("244",True)).grid(column=0,row=2,sticky='WNSE')tk.Button(win,text="Clear",command=lambda:xe.m_Gui_LogClear()).grid(column=0,row=3,sticky='WNSE')win.mainloop()演示图片参与贡献Fork 本仓库拉取Fork后仓库的代码到本地提交代码新建 Pull Request
Package: tk-toolkit
tk-toolkitA toolkit for Tikinter to make your coding simpler and quickerInstall withpipinstalltk-toolkitImport withfromtk_toolkitimporttk_toolkitCurrent features:Webcam displayQuick menu makerCheckoutexample.pyto see examples of the features being usedHead over to theProject Boardto see our plans, request features or alert us to any issues
Package: tk-tools
PurposeThis repository holds useful high-level widgets written in pure python.This library used type hints and requires Python 3.5+; it could, however, be back-ported to earlier Python versions without difficulty.For more details, check out thedocumentation.Here are some examples screenshots of the widgets you can create:Button-Grid:Binary-Label:Calendar:Entry-Grid:Multi-Slot FrameGraph:Key-Value:Label-Grid:LED: (size can be scaled)SevenSegment and SevenSegmentDisplayGaugeRotary-Scale: (Tachometer)DependenciesThis package is dependant onengineering_notation, which is one of my other packages.TestingBasic testing has been instantiatedhoweverit is currently limited.  To execute style testing:flake8 tk_toolsTo execute automated tests:py.test test.pyMore testing will be added to new widgets as they are brought online while further testing will be added to old widgets as the project matures.ContributionsContributions for new widgets, documentation, tests, and resolving issues are welcomed.Contribution guidelines:Fork the repository to your account.Clone your account repository to your local development environment.Create/checkout a new branch appropriately named by feature, bug, issue number, whatever.Make your changes on your branch. The ideal changes would:have working examples in the examples directoryhave documentation in the docs directoryPush your changes to your github account.Create a pull request from within github.All code is to be passingflake8before it is merged into master!
Package: tk_translate
tk-translateis a PySimpleGUI variant ofPageTranslate.
It provides a terse GUI to get some text translated using one of the various
services from PT or Deep-Translator. It's mostly just meant for testing.Presents two input boxes, some buttons, for plain text translations.
Usage:Insert text into left inputSelect backendChange target languageHit translateThere's also a[File] modewhich allows Office document /content.xml(best with DeepL) or text file translations. The output target is implied
to befilename.LANG.ext.
Other CLI translation tools can be edited into the combobox here. (The
dingonyms output doesn't look quite as useful in a plain text field).
Defaults can now be set in the[⛭] settings dialog.translationbackends usageThere's two options to instantiate the backends. The defaultassign_service()expects a dictionary of parameters, one
of which decides on the instance used:import tk_translate.translationbackends as tb
service = tb.assign_service({
    "backend": "DeepL Web",
    "from": "auto",
    "lang": "en",
    "quick": 1,
})
engl = service.translate("¿Donde esta la pizza?")While the individual classes also would allow keyword arguments:service = tb.GoogleAjax(lang="en")
text = service.linebreakwise(text)Using from= does require a syntax workaround however:service = tb.PonsWeb(lang="en", **{"from": "it"})Which works as well for all arguments. (Most being optional.)
MyMemory benefits from anemail=, while the commercial providers
want anapi_key=.deep-translatorWith two exceptions,deep-translatoris the better option.translationbackendsmerely retains some
Python2 compatibility (for good old OpenOffice). Instantiating it
fromtb.DeepTranslator(backend="Yandex")requires a second name
lookup in TB (backend=best prefixed with'DT: LibreTranslate').
Package: tkup
# tkuptkup is a thin wrapper around standard Tkinter widgets, allowing you to writecode that visually reflects the widget hierarchy. It doesn't try to reinventthe wheel and just helps you use normal Tkinter in a streamlined way.Typical Tkinter code is flat, even though it represents a heavily nestedstructure, which makes it difficult to quickly read and understand the trueorganization of the GUI. You must also explicitly assign each widget's master,which is error-prone and verbose:```pythonimport tkinter as tkfrom tkinter import ttkapp = tk.Tk()app.title = "Demo"outer_frame = ttk.Frame(app)outer_frame.grid()hi_button = ttk.Button(outer_frame, text="hi")hi_button.grid()app.mainloop()```tkup solves this by using nested with-statements. There are factory functionsfor each kind of widget, and you can use them as context managers so thatnested master widgets are automatically assigned. Post-instantiation calls,like gridding, can be accomplished two ways, most traditionally by naming theyielded value:```pythonfrom tkup import GUIapp = GUI()with app.root() as root:root.title = "Demo"with app.frame() as outer_frame:outer_frame.grid()with app.button(text="hi") as hi_button:hi_button.grid()app.run()```However, naming every single widget just to grid it can be tiresome.Inspired by Kotlin's implicit creation of the `it` variable in lambdas,the GUI class provides an `it` method which returns the current master widget,and there is an additional convenience method called `with_it` which returnsthe GUI instance and its `it` method for quick assignment to variables:```pythonfrom tkup import GUIapp, it = GUI().with_it()with app.root():it().title = "Demo"with app.frame():it().grid()with app.button(text="hi"):it().grid()app.run()```tkup prefers themed (ttk) widgets wherever available. If you want to useclassic widgets, or if you want to use a custom subclass of `tkinter.Widget`,then you can use the GUI `widget` method and pass in the type to instantiate:```pythonimport tkinter as tkfrom tkup import GUIapp = GUI()with app.root():with app.widget(tk.Button, text="foo"):...```## Installation```pip install tkup```tkup supports Python 3.5 and higher.
Package: tkutils
Welcome to TkUtilstkutilsis a package offering some additional logic and syntactic sugar when usingtkinter.
The main goal is to fill some gaps of tkinter, which might make it very annoying to use.Online version of the help documentation:http://frederic.zinelli.gitlab.io/tkutils/FeaturesAdditional logic: two-way binding, withBinderTheBinderclass is  to setup a transparent two-way
binding reactivity between widgets and underlying object properties from the model/logic layer
of the application.Several advantages come with this:Changes of bound properties in the model layer are cascading in the GUI automatically.The model layer of the application becomes (finally) totally independent from the presentation
layer. This means it becomes very easy to build and test the model layer, without any need to
think about its integration withtkinteritself.Syntactic sugarGridLayoutA grid layout manager which is abstracting away all the naughtywidget.grid(...)calls and
rows/columns grid configuration. Positioning widgets in the grid and controlling their "spanning"
becomes very easy, without extra typing.MenuBuilderA helper to build menus and to abstract away all the technicalities encountered when creating menus throughtkinter, which quickly make the declarations very unclear. Using theMenuBuilder, the actualMenuhierarchy becomes very obvious: "what you see is what you get".EventA utility to build event strings with auto-completion/IDE suggestions support.KeySymA utility to get all keysym information with auto-completion/IDE suggestions (providing string,
keycode and keysym_num values).imagesVarious factories related to images to:Simplify and reduce the typing needed,Handle file conversions automatically,Register automatically the image object on the host for the user (to avoid garbage collection).Requirementspython 3.8+PillowInstallationThroughPyPi:pipinstalltkutilsUsing an archive file (with the appropriate version number):pipinstalltkutils.1.0.2.tar.gzCloning theGitLab repository.
Package: tkvalidate
tkvalidateValidation functions that only allow integers or floats for tkinterEntrywidgetsThe validate functions are called with anEntrywidget as an argument. The following code will validate anEntryso
only integers in the range -5 to 5 may be entered.import tkinter as tk

root = tk.Tk()
widget = tk.Entry(root, justify=tk.CENTER)
widget.pack(padx=10, pady=10)
int_validate(widget, from_=-5, to=5)
root.mainloop()This works on any subclass ofEntry. For attk.Spinboxit can take the limits directly from theSpinbox. The
following code accomplishes the same as the previous but with aSpinbox.import tkinter as tk
from tkinter import ttk

root = tk.Tk()
widget = ttk.Spinbox(root, justify=tk.CENTER, from_=-5, to=5)
widget.pack(padx=10, pady=10)
int_validate(widget)
root.mainloop()For validating floating points instead of integers, simply usefloat_validateinstead.