資源簡介
Python程序設(shè)計(第二版)配套資源,包含代碼案例、PPT等多項教程配套資源。
代碼片段和文件信息
import?socket
import?sys
#服務(wù)端主機IP地址和端口號
HOST?=?‘10.2.1.2‘
PORT?=?50007
s?=?socket.socket(socket.AF_INET?socket.SOCK_STREAM)
try:
????#連接服務(wù)器
????s.connect((HOST?PORT))
except?Exception?as?e:
????print(‘Server?not?found?or?not?open‘)
????sys.exit()
while?True:
????c?=?input(‘Input?the?content?you?want?to?send:‘)
????#發(fā)送數(shù)據(jù)
????s.sendall(c.encode())
????#從服務(wù)端接收數(shù)據(jù)
????data?=?s.recv(1024)
????data?=?data.decode()
????print(‘Received:‘?data)
????if?c.lower()?==?‘bye‘:
????????break
#關(guān)閉連接
s.close()
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1826??2016-08-06?17:51??第19章?安卓平臺的Python編程\code\19_8.py
?????文件????????443??2017-02-26?17:00??第19章?安卓平臺的Python編程\code\androiCapture.py
?????文件????????302??2016-01-13?08:02??第19章?安卓平臺的Python編程\code\erweima.py
?????文件????????895??2017-02-26?21:38??第19章?安卓平臺的Python編程\code\generateQRCode.py
?????文件??????13218??2017-02-26?17:59??第19章?安卓平臺的Python編程\code\test.jpg
?????文件?????450048??2017-02-17?17:10??第19章?安卓平臺的Python編程\第19章?安卓平臺的Python編程.ppt
?????文件?????????84??2017-02-06?17:24??第1章?基礎(chǔ)知識\code\1_1.py
?????文件????????186??2017-02-06?17:25??第1章?基礎(chǔ)知識\code\1_2.py
?????文件?????????94??2017-02-06?17:26??第1章?基礎(chǔ)知識\code\1_3.py
?????文件????????830??2017-02-06?17:30??第1章?基礎(chǔ)知識\code\Codefr
?????文件???????1146??2015-12-18?14:35??第1章?基礎(chǔ)知識\code\convert2to3.py
?????文件????1619968??2017-03-12?11:33??第1章?基礎(chǔ)知識\第1章?基礎(chǔ)知識.ppt
?????文件???????1375??2015-12-06?16:45??第2章?Python序列\(zhòng)code\2.4.3.py
?????文件???????1786??2015-12-17?15:34??第2章?Python序列\(zhòng)code\BinaryTree.py
?????文件????????273??2015-01-05?14:59??第2章?Python序列\(zhòng)code\ComparePlusAndAppend.py
?????文件???????1246??2014-10-24?13:50??第2章?Python序列\(zhòng)code\CountForFrequences.py
?????文件???????1278??2015-12-17?15:44??第2章?Python序列\(zhòng)code\DirectedGraph.py
?????文件????????357??2015-02-26?21:47??第2章?Python序列\(zhòng)code\InsertAndAppendOfList.py
?????文件????????588??2014-10-25?09:04??第2章?Python序列\(zhòng)code\ListComprehension.py
?????文件???????1655??2016-04-18?09:46??第2章?Python序列\(zhòng)code\myQueue.py
?????文件???????1387??2016-01-09?12:22??第2章?Python序列\(zhòng)code\noRepeatNumbers.py
?????文件???????1289??2016-01-30?16:39??第2章?Python序列\(zhòng)code\shiftLeftn.py
?????文件???????1979??2014-10-24?00:06??第2章?Python序列\(zhòng)code\SortOrSoted.py
?????文件???????1746??2016-04-18?09:46??第2章?Python序列\(zhòng)code\Stack.py
?????文件?????906240??2017-03-02?15:00??第2章?Python序列\(zhòng)第2章?Python序列.ppt
?????文件???????2496??2017-02-26?08:27??第3章?選擇與循環(huán)\code\catchFox.py
?????文件???????1532??2017-03-04?12:28??第3章?選擇與循環(huán)\code\numberSplit.py
?????文件????????312??2017-02-08?09:49??第3章?選擇與循環(huán)\code\例3_1.py
?????文件?????????79??2017-02-08?10:02??第3章?選擇與循環(huán)\code\例3_10.py
?????文件????????198??2017-02-08?10:03??第3章?選擇與循環(huán)\code\例3_11.py
............此處省略784個文件信息
評論
共有 條評論