Python Language

[Pages:1112]Python Language

#python

1

1: Python

2

2

3

Python 3.x

3

Python 2.x

3

Examples

4

4

, Python

4

, Python, IDLE

5

Hello World Python

6

Python

6

-

7

8

8

9

14

IDLE - Python

15

15

16

16

16

17

18

18

19

19

20

21

21

22

26

27

28

33

34

- str () repr ()

35

()

35

()

36

pip

36

/

37

37

38

Python 2.7.x 3.x

38

2: * args ** kwargs

42

42

h11

42

h12

42

h13

42

Examples

43

* args

43

** kwargs

43

* args

44

** kwargs

45

* args

45

46

kwarg

46

** kwargs

46

3: ArcPy

48

48

Examples

48

48

createDissolvedGDB gdb

48

4: ChemPy - python

49

49

Examples

49

49

49

49

50

50

( )

50

5: Conditionals

52

52

52

Examples

52

if, elif,

52

( ? ?)

52

53

Else statement

53

54

54

54

55

55

56

cmp,

57

List List

57

, None

58

6: ConfigParser

60

60

60

60

Examples

60

60

61

7: ctypes

62

62

Examples

62

62

62

62

63

ctypes

63

ctypes

64

ctypes

65

65

8: Enum

67

67

Examples

67

(Python 2.4 3.3)

67

67

9: hashlib

68

68

Examples

68

MD5-

68

, OpenSSL

69

10: Heapq

70

Examples

70

70

70

11: HTML-

72

Examples

72

BeautifulSoup

72

CSS BeautifulSoup

72

PyQuery

73

12: ijson

75

75

Examples

75

75

13: kivy - Python NUI

76

76

Examples

76

76

14: Loops

79

79

79

79

Examples

79

79

81

81

81

break

81

continue

82

83

return break

83

?else?

84

?

86

86

87

88

89

89

90

?Half loop? do-while

90

91

15: Mutable vs Immutable ( Hashable) Python

92

Examples

92

Mutable vs Immutable

92

Immutables

92

93

Mutables

93

94

Mutable and Immutable

94

95

16: Neo4j Cypher Py2Neo

97

Examples

97

97

Neo4j Graph

97

Neo4j

97

1:

98

2:

98

Cypher

98

17: os.path

100

100

100

Examples

100

100

100

101

101

.

101

, ,, ,

101

18: Pandas Transform:

103

Examples

103

103

103

transform pandas

103

104

transform ,

104

19: pip: PyPI

106

106

106

106

Examples

107

107

107

107

, `pip`

108

108

Linux

108

Windows

109

requirements.txt

109

requirements.txt virtualenv

109

Python pip

109

,

110

112

112

20: PostgreSQL

115

Examples

115

115

115

115

21: py.test

117

Examples

117

py.test

117

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download