-selected button state
Scale
A range control that displays a numeric scale that is a range of numbers for the output limit
Scrollbar
A scrollbar control that is used when the content exceeds a visual area, such as a list box ...
Text
Text control; for displaying multiple lines of text
TopLevel
A container control that provides a separate dialog box, similar to a frame
Spinbox
Input controls, similar to
If you want to use Python to develop a graphical interface, there are many tools to choose from, each with the pros and cons, previously used Wxpython+boa-constructor, has not been clear.
New understanding of the next PyQt4, seems to use this person also more, so decided to start learning this. Version:pyqt-py2.7-x86-gpl-4.9.1-1.exe
PyQt4 takes a QT designer and uses it to create an interface, layout controls such as Form,button,text, and so on, using
construction Methods: Gauge (Parent,id,range=100,pos,size,style=ga_horizontal)Range refers to the value of an end point specified when the progress bar is loaded, and the program will confirm that the current progress bar should be more than full. The style specifies whether the load is loaded horizontally or vertically, and is loaded vertically ga_verticalUnlike some other components, it is not enough to construct the progress bar in the window alone, so the progress bar is static. The progres
TK InterFirst window from Import *Tk (). Mainloop ()The current thread calls Mainloop () and changes into the event loop, and the code behind is blocked.If you want to create multiple windows from Import *fromimport * for in range (5): Thread (Target= Tk (). Mainloop). Start ()print 2333sys.stdout.flush ()#2333Create buttonThe Relxx property represents the relative value of the size of the main window 0~1 from Import *top=Tk () b=button (top,text='click') b.place ( Relx=0, rely=0.5, relwidth=
+ '/' + self.dir.encode (' GBK ')) Self.imgList.sort ( SELF.CMP) def setchapterpage (self,page,chapter): Self.nowpage = Pageif Self.flag = = 0: # Execute code that should be executed in the constructor Self.flag = 1self . Setdictready () if Self.nowchapter! = Chapter: # If you do not need to change the current folder, do not reset the working directory Self.nowchapter = Chapterself.setdictready () Self.target = self.generateaddr (page,chapter) self.sendAddr.emit (QstrinG (Self.target), Self.now
1. First entry procedureFrom tkinter Import *root = Tk () Entry (Root). Pack () Root.mainloop ()2. Set the initial value in entry, use Textvariable to bind the variable to entryFrom tkinter Import *root = Tk () e = Stringvar () entry = entry (root,textvariable = e) e.set (' Input your text here ') Entry.pack () Root.mainloop ()In the previous article, I used textvariable to change the text value in Buttun.3. Set as read-only entry.Another more useful property of entry, which is set to read-only,
()) v = stringvar () scale (root, from_ = 0, #设置最小值 to = 100.0, #设置最大值 Resolution = 0.0001, #设置步距值 Orient = horizontal, #设置水平方向 variable = V, #绑定变量 command = Printscale #设置回调函数 ). Pack () Print (V.get ()) Root.mainloop () This callback function has a parameter, this value is the value of the current scale, each move a step will be called once this function, only ensure that the last one will definitely be
How to use Python to perform simple operations on Excel, which is important for interface automation testingA. Prepare a JSON document in the following format:{"Register": {"mobile": "15500000090"},"Login": {"mobile": "15500000090", "Password": "111111"}}1. You may be confused, this format and normal JSON format a little different, the general JSON string is this {"mobile": "15500000090"}* Written in the ab
English and European languages; it can only be represented by a maximum of 8 bits (one byte), that is: 2**8 = 256, so the ASCII code can represent up to 256 symbols.
Unicode code: Also known as the Universal Code, the purpose is to solve the limitations of the traditional character encoding scheme, which sets a uniform and unique binary encoding for each character in each language, which specifies that although some characters and symbols are represented by at least 16 bits (2 bytes), tha
Python learning notes (interface automation framework) and python learning notes
Previously, we used the unittest test framework provided by python.
This time, I designed one by myself and then added a little more functionality to it.
(Ps: of course, this framework is really very simple .. Very simple... Very simple ..
How to use Python to do simple work with ExcelI. install XLWT via PIP, xlrd these two modules*pip Install XLWT*pip Install xlrd Two. Prepare a copy of the interface test case, Excel documentThree. Python script reads Excel content#ReadExcelContentImport xlrd#GetExcelFile storage Addressdata = Xlrd.open_workbook (‘.. \dataconfig\interfacetestcase.xlsx ')#Get the first1ASheettables = Data.sheets () [0] # pr
insert Docstrings fromModules(y/N) [N]:y>doctest:automatically test code snippetsinchdoctest Blocks(y/N) [N]:N>Intersphinx:link betweenSphinxdocumentation of different projects(y/N) [N]:y>Todo:Write"Todo"entries that can shownorHidden on Build(y/N) [N]:N>Coverage:Checks forDocumentation Coverage(y/N) [N]:N>Pngmath:include math,rendered asPNG Images(y/N) [N]:N>Jsmath:include math,renderedinchThe browser byJsmath (y/N) [N]:N>ifconfig:conditional inclusion of content based on config values(y/N) [N
path in the environment variables. Verify that the installation is successful after you enter the terminal: Python. If there is no error, OK.2.3 Appium Environment ConstructionEnvironment prepared so much, now is the highlight of our play. A little bit about appium should know that in fact he is based on selenium, so our environment is essential to have selenium, he is only part of it, there are other important members. Let's take a look at their rel
Python write automation-Email sending (anonymous), python mail sending
In order to realize the mail sending function, first of all, we need to know the mail sending process is what it looks like, here no longer detailed description, please search or view the http://www.sogouqa.com /? P = 438
After learning about the mail sending process, we need to use the window
sed replacement functionProgram 2: Modify the Haproxy configuration fileDemand:Demand Original configuration file6. Character encoding and transcoding detailed article:Http://www.cnblogs.com/yuanchenqi/articles/5956943.htmlHttp://www.diveintopython3.net/strings.html
Need to know:
1. In Python2 the default encoding is ASCII, the default is Unicode in Python3
2.unicode is divided into utf-32 (4 bytes), utf-16 (accounting for two bytes), Utf-8 (1-4 bytes), so utf-16 is now the mos
= ' HTTPS://WWW.JUHE.CN/DOCS/API/ID/39 'r = Requests.get (URL) #发送get请求Print (R.status_code) #打印状态码Print (r.headers) #打印返回的报头 (head)Print (R.text) #查看返回结果的文本形式 (body part)Sslerror: Certificate Issue:Method 1: Check if the Faddler is closed and the access is successful whenMethod 2: The request parameter is followed by the Verify=falseVerify defaults to True, at which time the certificate is validated and false will not validate the certificatehave a Body section:content-type:application/x-www-f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.