linux-tools/modules/helloworld/HelloWorld.py

14 lines
458 B
Python
Raw Normal View History

import subprocess
class HelloWorld:
2020-03-05 21:34:17 +01:00
"""docstring for SampleModule."""
def run(self):
print("This shows that your installation is working correctly.")
print("You can now start using the tool.")
output = subprocess.check_output("cat /etc/*-release", shell=True).decode("UTF-8")
print("Your system information \n" + output)
with open("your_system_information.txt", "w") as file:
file.write(output)