1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
# coding:utf-8
#version 3.x python
from tkinter import *
from tkinter.ttk import *
print("TkVersion", TkVersion)
print("TclVersion", TclVersion)
print("Python version", sys.version_info)
class Main:
def __init__(self, root):
self.root = root
self.root.title("--------------")
self.root.geometry("20x6+0+0") #("1420x660+0+0")
self.root.config(bg="cadet blue")
if __name__ =='__main__':
root = Tk()
application = Main(root)
# ---
nb_frame = 0
ztest = 0
# ---
def f2(ztest):
ztest = 10
print("nb",ztest)
return ztest
def f1():
nb_frame = 2
f2(ztest)
print("f2", ztest)
f1()
root.mainloop() |
Partager