-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_package1.py
More file actions
32 lines (26 loc) · 845 Bytes
/
test_package1.py
File metadata and controls
32 lines (26 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding: utf-8 -*-
# 测试python包
import test_package
# from test_package import test_package2
test_package.test_package2.test2()
if __name__ == '__main__':
import os
import platform
filename_list = os.listdir('.')
file_count, dir_count = 0,0;
for file in filename_list:
if os.path.isfile(file):
file_count += 1
else:
dir_count += 1
apath = os.path.abspath(file)
print apath
print os.path.dirname(apath)
print os.path.split(apath)
print os.path.basename(apath)
print 'total',len(filename_list),'files:',file_count,'dirs:',dir_count
# print platform.machine()
# print platform.python_version()
# print platform.release()
# print platform.system()
# print platform.version()