Python Gets the version number of ET and Excel

Copy the Code code as follows: #-*-Coding:utf-8-*-From win32com.client import Dispatchif __name__ = = ' __main__ ':App = Dispatch ("ET. Application ")# minor Version numberprint ' app. build:%s '% App. Build# Large Version numberprint ' app.

Flask SQLAlchemy One-to-one, one-to-many usage practices

Flask-sqlalchemy Installation and table operation please refer to here. Copy the Code code as follows: # Role Table Class Role (db. Model): Id=db. Column (db. Integer,primary_key=true) Name=db. Column (db. String (80)) # Roletype Table Class Role_

Cython three-minute introductory tutorial

Author: Perrygeo Translator: Rai Yonghao (http://laiyonghao.com) Original: http://www.perrygeo.net/wordpress/?p=116 My favorite is Python, whose code is elegant and practical, but it's slower than most languages purely from a speed point of view.

Python converts renminbi to uppercase script code

Copy CodeThe code is as follows: def num2moneyformat (Change_number): """ Convert numbers to uppercase currency format (format_word.__len__ ()-3 + 2 decimal places) Change_number supports float, int, long, string """ Format_word = ["min", "angle", "

Python implements code to convert HTML to PDF (contains Chinese)

Premise: Installing Xhtml2pdf https://pypi.python.org/pypi/xhtml2pdf/Download fonts: Microsoft Ya-hei; give me an address: http://www.jb51.net/fonts/8481.html Files to convert: 1.htmCopy the Code code as follows: Text

A collection of questions and answers about date-time processing in Python

How to install the Setuptools module without creating the egg compression package but the source code Q: How to install the Setuptools module does not generate the egg compression package but the source code, which can sometimes be modified to

Python File Operation Implementation code

Open (Filename,mode,buffer) The first parameter is the file name of the file to open, required, the second one is open, optional, and the third is the buffer, optional. By default, the file is opened in read mode. The function returns a stream type

Ways to run a Python program

After we've installed Python, we can do two things, 1. Copy the Python331.chm user manual from the doc directory in the installation directory to the desktop for easy learning and viewing 2. Place the Python installation path my C:\Python33\ was

Python calculates the least-priority queue code share

Copy CodeThe code is as follows: #-*-Coding:utf-8-*- Class Heap (object): @classmethoddef parent (CLS, i):"" "Parent Node Subscript" ""return int ((i-1) >> 1); @classmethodDef left (CLS, i):"" "Left son subscript" ""Return (I @classmethoddef

Python modifies instance code for Excel data

In the previous article, we described how to read and write Excel data in Python, and how to modify Excel data with Python today. Need to use the Xlutils module. The download address is https://pypi.python.org/pypi/xlutils. After downloading,

Python crawl discuz! user name script code

Recently, I learned Python, so I wrote a script that crawled the discuz! user name in Python, with little code but a twist. The idea is simple, that is, the regular match title and then extract the user name to write the text document. Program to

How Python crawls Web site data is saved using

Coding issuesBecause it involves the Chinese language, so inevitably involves the problem of coding, this time to take this opportunity to be completely clear. The problem should be from the coding of words. The original English code is only 0~255,

How Python calls the shell

1.1 Os.system (command) Runs command commands in a child shell and returns the exit status after command execution is complete. This is actually implemented using the C standard library function system (). This function will need to reopen a

Python Code checker tool Pylint make your Python more canonical

1. What is Pylint?Pylint is a Python Code analysis tool that parses errors in Python code to find code style standards that are not compliant (the code style used by Pylint is PEP 8, specific information, see Resources), and potentially problematic

PYQT and Pyside development of graphical interfaces

Copy CodeThe code is as follows: #!/usr/bin/env python Import Sys From PYQT4 import Qtgui,qtcore Import Httplib From Urllib import UrlEncode Import re def out (text):p = re.compile (R ' "," ')m = p.split (text)Result=unicode (M[0][4:].decode ('

The Python break statement is detailed

The Python break statement, like in the C language, breaks the minimum enclosing for or while loop. The break statement terminates the Loop statement, that is, the loop condition does not have a false condition, or the sequence is not fully

Python33 URLLIB2 How to use details

Settings for Proxy URLLIB2 uses the environment variable HTTP_PROXY to set the HTTP proxy by default. If you want to explicitly control the Proxy in the program without being affected by the environment variables, you can use the following

Python Random Module (get random number) common methods and usage examples

Random.randomRandom.random () is used to generate a random number of 0 to 1 points: 0 Random.uniformRandom.uniform (A, b), used to generate a random number of characters in a specified range, two parameters one of which is the upper bound, and the

Example of Python dynamic monitoring log content

Log file is generally generated by the day, then by the program to determine the date of the file and the current time, replace the monitoring log file The program is just a simple example, monitor Test1.log for 10 seconds, turn to monitor Test2.log

Examples of Python using HTPASSWD to implement Basic authentication authorization

I explained how the Raspberry Pi (Raspberry Pi) into a non-line, feeling every time through the command SSH management show trouble, so I write the Web interface, mainly using Python written CGI program, here to use the MINI_HTTPD this lightweight

Total Pages: 4013 1 .... 2185 2186 2187 2188 2189 .... 4013 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.