mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
fix a lot of Tkinter imports
This commit is contained in:
parent
6cb2bddb85
commit
d6d63f5437
76 changed files with 536 additions and 536 deletions
|
@ -12,7 +12,7 @@
|
|||
# -- totally static, though different between PackDialog and WidgetDialog
|
||||
# (but even that could be unified)
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
class Option:
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Widget to display a man page
|
||||
|
||||
import re
|
||||
from Tkinter import *
|
||||
from Tkinter import _tkinter
|
||||
from ScrolledText import ScrolledText
|
||||
from tkinter import *
|
||||
from tkinter import _tkinter
|
||||
from tkinter.scrolledtext import ScrolledText
|
||||
|
||||
# XXX These fonts may have to be changed to match your system
|
||||
BOLDFONT = '*-Courier-Bold-R-Normal-*-120-*'
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
import string
|
||||
from types import *
|
||||
from Tkinter import *
|
||||
from ScrolledText import ScrolledText
|
||||
from tkinter import *
|
||||
from tkinter.scrolledtext import ScrolledText
|
||||
|
||||
class MimeViewer:
|
||||
def __init__(self, parent, title, msg):
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import os
|
||||
import sys
|
||||
import string
|
||||
from Tkinter import *
|
||||
from ScrolledText import ScrolledText
|
||||
from Dialog import Dialog
|
||||
from tkinter import *
|
||||
from tkinter.scrolledtext import ScrolledText
|
||||
from tkinter.dialog import Dialog
|
||||
import signal
|
||||
|
||||
BUFSIZE = 512
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Brownian motion -- an example of a multi-threaded Tkinter program.
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Brownian motion -- an example of a NON multi-threaded Tkinter program ;)
|
||||
# By Michele Simoniato, inspired by brownian.py
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import random
|
||||
import sys
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
from Canvas import Oval, Group, CanvasText
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# optional bitmap, and any number of buttons.
|
||||
# Cf. Ousterhout, Tcl and the Tk Toolkit, Figs. 27.2-3, pp. 269-270.
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import sys
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# /usr/include/X11/bitmaps for samples); it is displayed as the
|
||||
# background of the animation. Default is no bitmap.
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import random
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# background of the animation. Default is no bitmap.
|
||||
|
||||
# This uses Steen Lumholt's Tk interface
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
|
||||
# Basic Towers-of-Hanoi algorithm: move n pieces from a to b, using c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Display hello, world in a button; clicking it quits the program
|
||||
|
||||
import sys
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
def main():
|
||||
root = Tk()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Draw on top of an image"""
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import sys
|
||||
|
||||
def main():
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import sys
|
||||
|
||||
def main():
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env python
|
||||
# Tkinter interface to Linux `kill' command.
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
from string import splitfields
|
||||
from string import split
|
||||
import subprocess
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import sys
|
||||
import string
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
def listtree(master, app):
|
||||
list = Listbox(master, name='list')
|
||||
|
|
|
@ -9,7 +9,7 @@ import getopt
|
|||
import string
|
||||
import mhlib
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
from dialog import dialog
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"""Play with the new Tk 8.0 toplevel menu option."""
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
class App:
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# option menu sample (Fredrik Lundh, September 1997)
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
root = Tk()
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ options like other shapes or colors...
|
|||
davem@magnet.com
|
||||
"""
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
"""paint.py: not exactly a paint program.. just a smooth line drawing demo."""
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
# XXX This should be written in a more Python-like style!!!
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import sys
|
||||
|
||||
# 1. Create basic application structure: menu bar on top of
|
||||
|
|
|
@ -25,7 +25,7 @@ know!
|
|||
import math
|
||||
import random
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
from Canvas import Rectangle, CanvasText, Group, Window
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ stand-alone application.
|
|||
"""
|
||||
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
from Canvas import Line, Rectangle
|
||||
import random
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ def colnum2name(n):
|
|||
s = chr(m+ord('A')) + s
|
||||
return s
|
||||
|
||||
import Tkinter as Tk
|
||||
import tkinter as Tk
|
||||
|
||||
class SheetGUI:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Tkinter interface to SYSV `ps' and `kill' commands.
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
if TkVersion < 4.0:
|
||||
raise ImportError("This version of svkill requires Tk 4.0 or later")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Show how to do switchable panels.
|
||||
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
class App:
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import sys
|
|||
import os
|
||||
import string
|
||||
import re
|
||||
from Tkinter import *
|
||||
from tkinter import *
|
||||
from ManPage import ManPage
|
||||
|
||||
MANNDIRLIST = ['/depot/sundry/man/mann','/usr/local/man/mann']
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# note that there is no explicit call to start Tk.
|
||||
# Tkinter is smart enough to start the system if it's not already going.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This program shows how to use the "after" function to make animation.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this is the same as simple-demo-1.py, but uses
|
||||
# subclassing.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import string
|
||||
|
||||
# This program shows how to use a simple type-in box
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this program creates a canvas and puts a single polygon on the canvas
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this is the same as simple-demo-1.py, but uses
|
||||
# subclassing.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this file demonstrates a more sophisticated movement --
|
||||
# move dots or create new ones if you click outside the dots
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this file demonstrates the movement of a single canvas item under mouse control
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# allows moving dots with multiple selection.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
|
||||
class Test(Frame):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this file demonstrates the creation of widgets as part of a canvas object
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This example program creates a scroling canvas, and demonstrates
|
||||
# how to tie scrollbars and canvses together. The mechanism
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from Tkinter import *
|
||||
from Dialog import Dialog
|
||||
from tkinter import *
|
||||
from tkinter.dialog import Dialog
|
||||
|
||||
# this shows how to create a new window with a button in it
|
||||
# that can create new windows
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import string
|
||||
|
||||
# This program shows how to use a simple type-in box
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
import string
|
||||
|
||||
# This program shows how to make a typein box shadow a program variable.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This file shows how to trap the killing of a window
|
||||
# when the user uses window manager menus (typ. upper left hand corner
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# some vocabulary to keep from getting confused. This terminology
|
||||
# is something I cooked up for this file, but follows the man pages
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# some vocabulary to keep from getting confused. This terminology
|
||||
# is something I cooked up for this file, but follows the man pages
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
|
||||
class Test(Frame):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
|
||||
class Test(Frame):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This is a program that tests the placer geom manager in conjunction with
|
||||
# the packer. The background (green) is packed, while the widget inside is placed
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
|
||||
class Test(Frame):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This is a program that tests the placer geom manager
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
import string
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this file demonstrates the creation of widgets as part of a canvas object
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This is a demo program that shows how to
|
||||
# create radio buttons and how to get other widgets to
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
class Test(Frame):
|
||||
def printit(self):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
class Test(Frame):
|
||||
def printit(self):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# shows how to make a slider, set and get its value under program control
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# This is a program that makes a simple two button application
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# The way to think about this is that each radio button menu
|
||||
# controls a different variable -- clicking on one of the
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this shows how to create a new window with a button in it
|
||||
# that can create new windows
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
# this shows how to spawn off new windows at a button press
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from Tkinter import *
|
||||
from tkinter import *
|
||||
|
||||
import sys
|
||||
##sys.path.append("/users/mjc4y/projects/python/tkinter/utils")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue