### Install python2.7 ###
11 CD/home/Stephen/desktop
18 tar xvfj Python-2.7.2.tar.bz2
20 CD Python-2.7.2
30./configure
33 make
34 make install
# Test
Type 'python' for verifying
### Install Django-1.3 ####49 tar xzvf Django-1.3.tar.gz50 CD
I have always thought python is simple. Just after seeing a buddy's Python statement in the python group, I feel that I really deserve python.
First, a senior friend asked: how to convert '[a, B, c]' to [a, B, c], that is, string to list. I
I just installed Python 3.1.1 two days ago, so I can't help but write some code.
1. Select sort
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
>>>
Def
Selsort (l ):Length
=
Len (l)
I'm reading from other colleagues'CodeA unused Python Keyword: Yield
I first asked my colleague, and heard him say a few words. I had a vague impression that it was just fuzzy. So I searched for the information myself. After reading for a long
And many advancedProgramming LanguagePython also has default parameters. When the default parameter is of the numerical type, everything is wonderful:
>>> Def Function(A, B = 1000000 ): B + = ReturnB If you like, you canCodeAnd the results
I recently read from many colleaguesCode, Encountered some Python statements that have never been used before, accumulate it.
1. Obtain the local MAC address:
Import UUID
MAC = UUID. uuid1 (). HEX [-12:]
2 del usage
A = ['B', 'C', 'D']
Python's SYS module contains standard input, output, and error streams: SYS. stdin, SYS. stdout, SYS. stderr.
Stream redirection includes redirecting to a file,Program, And Python objects.
Redirect to file: filename redirects the standard
In python, arc4 is composed:
Http://pythonhosted.org/pycrypto/
In Linux.
But it does not provide a good description of how to use arc4.
1, arc4 does not support UTF-8 and Other encoding, so only can pass binary, if too troublesome, you can
I don't know much about Java, C ++ is a little better, and python is familiar. I just started to look at JavaScript.
Two major keywords of JS: function and VaR
The type is not the main type in JS. Similar to Python, there is no explicit type
When I was using pyside, I used a thread to load modules.CodeDuring execution, an exception occurred during running. Even a simple print may be abnormal, so I found this discussion on stackoverflow, use the thread module of QT or the thread module
During the installation of gadfly, although I read the installation file, I still feel unable to start, so I ran setup directly. PY, and then copy The Gadfly folder directly to the Karrigell-2.4.0/database/directory can be used, huh, huh !!!
Good
If you are used to C ++, Java, or other object-oriented languages, you will often use function overloading.
Function overloading means that the names of multiple functions and return values are of the same type. Only the parameter type or number
If you want to copy hundreds of files to another directory with duplicate names, but do not want to overwrite the original files, you can use the command line switch to complete the requirement.
Http://sunxiunan.com /? P = 1737
But I have
From today on, I will learn how to use Python/karrigell as a website.
For this article
Article He must have a general understanding of what karrigell is, but it doesn't matter if he doesn't know anything. although this word is complex and Kingsoft
#
! /Usr/bin/ENV Python
#
-*-Coding: UTF-8 -*-
#
2/10/16 Base trans. Wrote by srcdog on 20th, rjl, 2009
#
LD elements in base 2, 10, 16.
Import OS, sys
# global definition # base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
Summary of some tips for using Python crawlers to capture websites: posted on December 26,200 9 by observer
Python has been used for more than three months, and the most common examples are crawler scripts: scripts that capture the local
Google APIs are powerful. You can use python to call these Apis:
1. Google map API
>>> Import urllib and urllib2
>>> Val = {'q': 'New York ', 'sensor': 'false', 'output': 'xml', 'oe ': 'utf-8'} # There is a key option. If you have applied for a key,
The only constraint on the result of a decorator is that it be callable, so it canProperly Replace the decorated function.
The only restriction of decorator is that it must be callable. Therefore, if the class is used as the decorator, the _ call _
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