Let us suppose that we want to create a standalone app (executable application) using tkinter. We can convert any tkinter application to an exe compatible file format using the PyInstaller package in Python.To work with pyinstaller, first install the package in the environment by using the following command, pip install pyinstallerOnce installed, we can follow the steps to convert a Python Script File (contains a Tkinter application file) to an Executable file.Install pyinstaller using pip install pyinstaller in Windows operating system. Now, type pyinstaller --onefile -w filename and press Enter.Now, check the location of the file (script file) and you will ... Read More
Let us suppose that we are creating an application in which we want to change the color of the Button widget while we hover upon it. We can have the hovering property by defining the Event Callbacks.To change the color of the Button while hovering on it, we have to bind the and events. For each event, we will configure the button property such as background color, foreground color, etc.Example#Import required libraries from tkinter import * #Create an instance of tkinter frame win= Tk() #Define the geometry of the window win.geometry("750x250") #Define functions def on_enter(e): button.config(background='OrangeRed3', foreground= ... Read More
Let us suppose that for a particular application, we want to bind the mouse double-click so that it performs some event or operation. We can use the bind(‘’, handler) or bind(‘’, handler) methods to bind the mouse Left or Right Buttons with a handler or a callback function.ExampleIn this example, we will create an application that contains a button. When we double click the button, it will open a popup window.#Import required libraries from tkinter import * from tkinter import ttk #Create an instance of tkinter frame win= Tk() #Define the geometry of the window win.geometry("750x250") #Define a function def ... Read More
In order to close a Tkinter application, we generally refer to close the parent window using the destroy() method. To close the Tkinter window automatically after a certain time limit, we have to use the after(time in ms, callback) method by specifying the time and the callback function which needs to be run after a certain time limit.Example#Import the required Libraries from tkinter import * from tkinter import ttk #Create an instance of tkinter frame win = Tk() #Set the geometry of tkinter frame win.geometry("750x270") #Initialize a Label widget Label(win, text= "This window will get closed after ... Read More
Even if you have a public repository in GitHub, not everyone has the permission to push code into your repository. Other users have a read-only access and cannot modify the repository. In order to allow other individuals to make changes to your repository, you need to invite them to collaborate to the project.The following steps should be performed to invite other team members to collaborate with your repository.Step 1 − Click on the Settings tab in the right corner of the GitHub page.Step 2 − Go to Manage Access option under the Settings tab. On the Manage Access page, you ... Read More
A GitHub account is a pre-requisite for creating a GitHub repository. Follow the below steps after registering with GitHub.Step 1 − Login to the GitHub account. Once you login to your account you will see a ‘+’ button on the right. Click on the button and select "New repository" option to create a new repository.Configure the following in the create a new repository page.Repository name: GitHub will validate the repository name that you have entered.Type of the repository: GitHub lets you create the following types of repositories −Private repository − Private Repository is the one that can be accessed only ... Read More
Version control systems are of two types - centralized and distributed. In a centralized system there will be one single repository that is shared by all team members. Problem with this system is that if the central repo goes offline then all people dependent on the central repo will be affected.In git each person has a repository which means they are not dependent on the central server. They can work offline with this model. But how can we collaborate with this model? Synchronizing with each user of the repository would take time but we can have a better workflow which ... Read More
Cloning a repository involves downloading a copy of the source code from source control. In other words, cloning is creating a copy of an existing repository. Consider an example where multiple users are working on a project. This feature can be used by the users to create a development copy.If you have a GitHub repository, you need to first invite collaborators into the repository. Each collaborator will then clone the repository into their local machines.Locally they will work with this cloned repository, make local changes and perform commits on it. Once they are ready to share their changes with others ... Read More
Cherry picking is a way to choose specific commits from one branch and apply them to another branch. This is useful when you want to select specific changes from a pull request.git cherry-pick {commit_hash}The above command will cherry pick the commit associated with the specified commit hash to the current branch.From the above commits shown in the diagram, we need to apply only commit F1 from the feature branch to the master branch.In this case, the master branch after cherry picking will look as below.Example$ dell@DESKTOP-N961NR5 MINGW64 /e/tut_repo $ git init Initialized empty Git repository in E:/tut_repo/.git/ $ dell@DESKTOP-N961NR5 ... Read More
Rebasing alters a sequence of commits. It moves or relocates a sequence of commits from current branch to the target branch. By default, the commits from the current branch that are not already on the other branch are rebased. Rebasing technique allows us to keep a linear history.Let us understand from this from the diagram below.To rebase we need to be in the branch which needs to be rebased into the target. In our scenario, we need to execute the rebase command on the feature branch. After executing the rebase command we will get a linear history.After executing the rebase ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP