Example Python Class Template to build GUI Applications designed using Glade Visual Builder for GTK+. Sample Python Class to write event handling code for GTK based GUI Apps.
Python
How to left align text in a GTKLabel in Python?
Python script to left align text in GTKLabel. Python snippet to right align or top align or bottom align text in GTK Label. Horizontal or vertical aligning of GTK Label text in Python.
How to access GTK UI objects in a glade XML file in Python?
Python script to access GUI objects like GTK listbox, window, label, button, toolbar etc in a Glade XML file and link Python functions to GTK events or signals.
List all files in a directory in Python
Python script to list all files and sub-directories in a directory, or to list only files or only sub-folders in a folder, or files having a given extension.
How to read a large text file character by character in Python?
Python Script to read a large text file character by character without loading the entire text file in memory.
How to check if JSON string is valid in Python?
Python script to check if given JSON data or JSON string is in valid JSON format.
Extract adjacent JSON documents in a single line of a large text file in Python
Python Script to extract a large number of multiple neighboring JSON documents in a single line of huge text file, and write the extracted JSON documents to individual lines in an output file.
Slicing in Python to extract sub strings or sub lists in either direction
Slicing is a very powerful feature of Python to quickly extract slices of data from lists and strings in either forward or reverse direction.
How to check a value against multiple variables in Python?
The most readble and simplest way in Python to check if a given value exists in any of the multiple variables.
Convert Python Dictionary or List of Dictionaries to XML string
Python Code snippet to convert a dictionary or a list of dictionaries into a valid XML string.
How to pretty print a JSON file in Python?
Pretty printing makes a json file visually appealing and easy to edit. If you have a JSON file...