-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added system module and python_version, architecture and os_name
- Loading branch information
1 parent
4def82c
commit 80e0ee8
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import platform | ||
|
||
|
||
def architecture(): | ||
return platform.architecture()[0] | ||
|
||
|
||
tool_name = "system.architecture" | ||
tool_obj = architecture | ||
tool_requirements = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import platform | ||
|
||
def os_name(): | ||
system_name = platform.system() | ||
if system_name == 'Windows': | ||
return 'Windows' | ||
elif system_name == 'Darwin': | ||
return 'macOS' | ||
elif system_name == 'Linux': | ||
return 'Linux' | ||
else: | ||
return 'Unknown OS' | ||
|
||
|
||
tool_name = "system.os_name" | ||
tool_obj = os_name | ||
tool_requirements = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import platform | ||
|
||
|
||
def python_version(): | ||
return platform.python_version() | ||
|
||
|
||
tool_name = "system.python_version" | ||
tool_obj = python_version | ||
tool_requirements = [] |