FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python_example/network_learn/001.py at master · noah1985/python_example · GitHub
noah1985
/
python_example
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python_example
/
network_learn
/
001.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (14 loc) · 394 Bytes
Breadcrumbs
python_example
/
network_learn
/
001.py
Copy path
File metadata and controls
16 lines (14 loc) · 394 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
sys
import
urllib
.
request
try
:
rfc_number
=
int
(
sys
.
argv
[
1
])
print
(
"number is %d"
%
rfc_number
)
except
(
IndexError
,
ValueError
):
print
(
'Must supply an RFC number as first argument'
)
sys
.
exit
(
2
)
template
=
'http://www.ietf.org/rfc/rfc{}.txt'
url
=
template
.
format
(
rfc_number
)
rfc_raw
=
urllib
.
request
.
urlopen
(
url
).
read
()
rfc
=
rfc_raw
.
docoder
()
print
(
rfc
)
# 测试一下
Back
|
FazBrowse Home
|
New Git URL