File tree 1 file changed +21
-21
lines changed
1 file changed +21
-21
lines changed Original file line number Diff line number Diff line change 5
5
# Version : 1.0
6
6
7
7
# Modification 1 : Changed the profile to list again. Order is important. Everytime we run script we don't want to see different ordering.
8
- # Modification 2 : Fixed the AttributeError checking for all properties. Using hasttr().
9
- # Modification 3 : Removed ': ' from properties inside profile.
8
+ # Modification 2 : Fixed the AttributeError checking for all properties. Using hasttr().
9
+ # Modification 3 : Removed ': ' from properties inside profile.
10
10
11
11
12
12
# Description : Displays some information about the OS you are running this script on
13
13
14
14
import platform as pl
15
15
16
16
profile = [
17
- 'architecture' ,
18
- 'linux_distribution' ,
19
- 'mac_ver' ,
20
- 'machine' ,
21
- 'node' ,
22
- 'platform' ,
23
- 'processor' ,
24
- 'python_build' ,
25
- 'python_compiler' ,
26
- 'python_version' ,
27
- 'release' ,
28
- 'system' ,
29
- 'uname' ,
30
- 'version' ,
31
- ]
17
+ 'architecture' ,
18
+ 'linux_distribution' ,
19
+ 'mac_ver' ,
20
+ 'machine' ,
21
+ 'node' ,
22
+ 'platform' ,
23
+ 'processor' ,
24
+ 'python_build' ,
25
+ 'python_compiler' ,
26
+ 'python_version' ,
27
+ 'release' ,
28
+ 'system' ,
29
+ 'uname' ,
30
+ 'version' ,
31
+ ]
32
+
32
33
33
34
class bcolors :
34
35
HEADER = '\033 [95m'
@@ -41,8 +42,7 @@ class bcolors:
41
42
UNDERLINE = '\033 [4m'
42
43
43
44
44
-
45
45
for key in profile :
46
- if hasattr (pl ,key ):
47
- print (key + bcolors .BOLD + ": " + str (getattr (pl ,key )())+ bcolors .ENDC )
48
-
46
+ if hasattr (pl , key ):
47
+ print (key + bcolors .BOLD + ": " + str (getattr (pl , key )()) + bcolors .ENDC )
48
+
You can’t perform that action at this time.
0 commit comments