Other articles

  1. How to make a clock in Python

    This little script shows the time in a window.

    '''Import libraries'''
    from Tkinter import *
    import time
    
    '''Define a function'''
    def tick():
        '''Assign current time to time_string'''
        time_string = time.strftime("%H:%M:%S")
    
        '''Update the clock labels text'''
        clock.config(text=time_string)
    
        '''After 200ms run tick'''
        clock.after(200, tick)
    
    '''Make …
    read more
  2. Python - How to load a file and convert it base64

    This python script creates a window with four buttons, two labels and a text widget. The code is fairly good commented and speaks for itself. The coded file will be written as a text file.

    import Tkinter, Tkconstants, tkFileDialog
    from Tkinter import *
    import tkMessageBox
    import base64
    import webbrowser
    
    def exit …
    read more

Page 1 / 1

blogroll

social