I used Delphi to write a two-color ball calculator, which was destroyed along with the hard disk. However, at that time, the lottery data had to be manually input, which was troublesome.
In this case, rewrite it in Python to automatically obtain
ArticleDirectory
Update version 1.1
I. Functions
Ii. Example
Iii. Download
Update version 1.1
Right-click menu
Download the latest version 1.1 source code and executable programs
--- Introduction to version 1.0 ---I.
The socket library of ython uses the string type to send and receive data, so that when we use
I = socket. Recv (4)
To receive a 4-byte integer, the integer is actually saved in binary form in the string IIn most cases, we need a real integer/long
The shelve module of Python provides a simple data storage solution that operates data in the form of dict (dictionary.
#! /Usr/bin/pythonimport sys, shelvedef store_person (db ): "query user for data and store it in the shelf object" "pid = raw_
Some time ago, I used Google's blog space, which is also very general. So now I wantArticleTurn it over.To execute a Python script, you only need to perform the following operations on the python file:
Add # In the first line of the python file #
Python isA very concise language. Unlike other languages, the representation of data types is not predefined for many types (for example, in C #, 8 types of optical integers are defined ), it only defines six basic types: String, integer,Floating
1. String or byte string?
In my opinion, a python string can only be a byte string. You can even store an image or a binary executable file in it.
Import typesF = open ('d: // hello.jpg ', 'R ')PIC = f. Read ()Print type (PIC) = types.
1. # Call the timer in fout. py python... display...
From dummy_threading import *
Class fout:"This class contain some functions to display ..."_ Defualt_string = "Wait... system is waiting ......"_ Arg = ["start...", "... end"]
Def out (self, I = 0,
This is the eighth queen of code written in "beginning python from novice to professional" with a small amount of code and a generator.
Python always gives me the feeling that you can program in a concise language without worrying too much about
Complete the assignments assigned by addon n days ago. For various reasons, this is a drag-and-drop event. I finally wrote a 1.0 version tonight ...... Several test cases can basically cover most of the left and right balancing logics, but should
Automatic Web Testing Using PythonToday, I found a good module that can control ie using Python: pamie. It can open an IE window with a program, fill in the content to be submitted in the program, and can be automatically submitted, and then search
I learned a variety of languages and started to target Python and Perl today. Start with python.
------------------------------------------- I am a pangpang separator line ------------------------------------------
Definition of python on the
The previous article mentioned the length of Chinese characters. This article mainly tests this point and the code is as follows:
#! /Usr/bin/python #-*-coding: UTF-8-*- S = "China" SS = u "China" Print S, type (s), Len (s) Print SS, type (SS),
1. Download mod_wsgi address: http://code.google.com/p/modwsgi/downloads/list
2. After the download is complete (my download is mod_wsgi-3.4.tar.gz)
Tar zxvf mod_wsgi-3.4.tar.gz
./Configure -- With-apxs =/home/Aaron/httpd/bin/apxs -- With-Python
Sometimes you need to observe some data at work. When the threshold is reached, an alarm is triggered, and alarms are usually sent via email. The following section describes how to use python for email alerts.
First, find the address of the email
Lovely Python sortingPython-weak data type, no mandatory declaration requiredPython-everything is an objectPyhton-statement block ends with: And the next sentence is indented.Python-reuse level code lines → functions → classes →
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service