FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python_Learning/Module.py at master · wanglida/Python_Learning · GitHub
wanglida
/
Python_Learning
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
7
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_Learning
/
Module.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (16 loc) · 529 Bytes
Breadcrumbs
Python_Learning
/
Module.py
Copy path
File metadata and controls
20 lines (16 loc) · 529 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
17
18
19
20
# 模块,使用Python标准库的方法
# 使用sys模块
import
sys
print
(
'The command line arguments are:'
)
for
i
in
sys
.
argv
:
print
(
i
)
print
(
'
\n
The PYTHON PATH is'
,
sys
.
path
,
'
\n
'
)
# 使用模块的__name__
if
__name__
==
'__main__'
:
print
(
'This program is being run by itself.'
)
else
:
print
(
'I am being imported from another module'
)
import
PersonalModule
PersonalModule
.
firstMoudule
()
print
(
'Module Version='
,
PersonalModule
.
version
)
print
(
dir
(
sys
))
# 列出模块定义的标识符
Back
|
FazBrowse Home
|
New Git URL