03 2024 档案
摘要:#!/usr/bin/env python import vtk def main(): colors = vtk.vtkNamedColors() # Create the RenderWindow, Renderer and Interactor. # renderer = vtk.vtkRen
阅读全文
摘要:import sys from PyQt5 import QtWidgets, QtGui __version__ = '0.1.0' __author__ = 'xuxc' __appname__ = 'PyPost' class PyPostMainWindow(QtWidgets.QMainW
阅读全文
摘要:# coding:utf-8 from tkinter import * import math,time global List global i root = Tk() List = [] root.title("a simple clock") #设置窗口是否可以变化长/宽 root.resi
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- # 导入自定义support模块 import support # 现在可以调用模块里包含的函数了 support.print_func("Runoob") 自定义模块 support def print_func(
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- #可写函数说明 def printinfo(kname, age ): "打印任何传入的字符串" print ("Name: ", kname) print ("Age ", age) return #调用print
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- #可写函数说明 def printinfo(kname, age ): "打印任何传入的字符串" print ("Name: ", kname) print ("Age ", age) return #调用print
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- import calendar cal = calendar.month(2016, 1) print ("以下输出2016年1月份的日历:") print (cal) def printme(str): "打印传入
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- import time localtime = time.asctime( time.localtime(time.time()) ) print ("本地时间为 :", localtime) # 格式化成2016-
阅读全文
摘要:#!/usr/bin/python3 # -*- coding: UTF-8 -*- # Fibonacci series: 斐波纳契数列 # 两个元素的总和确定了下一个数 a, b = 0, 1 while b < 10: print(b, end=',') a, b = b, a+b print
阅读全文
摘要:#!/usr/bin/python3 # -*- coding: UTF-8 -*- # Fibonacci series: 斐波纳契数列 # 两个元素的总和确定了下一个数 a, b = 0, 1 while b < 10: print(b, end=',') a, b = b, a+b print
阅读全文
摘要:#!/usr/bin/python3 # -*- coding: UTF-8 -*- a=8 if a>7: print("大于") elif a<7: print("小于")
阅读全文
摘要:#!/usr/bin/python3 # -*- coding: UTF-8 -*- #注释 ''' 多行三点注释 ''' """ 多行注释 """ if True: print("true") else: print("false") a1=b1=c1=99 d,e,f=1,2,"myname"
阅读全文