-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem.py
More file actions
32 lines (22 loc) · 1.14 KB
/
Copy pathsystem.py
File metadata and controls
32 lines (22 loc) · 1.14 KB
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
#######################################################################################
# Author: Muneeb Mennad #
# Project Name: Passman #
# File Name: system.py #
# Project Start: 2026-01-24 #
# Github: https://github.com/mnbmnd #
#######################################################################################
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
import subprocess
def clear_screen():
subprocess.run(["clear"])
# Quits program and clears the screen
def reset():
subprocess.run(["reset"])
# Gets system username
def whoami():
whoami = subprocess.run(["whoami"], capture_output=True, text=True)
return whoami.stdout.replace(
"\n", ""
) # Returns output of whoami without the newline chr
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# mnbmnd