Skip to content

Commit d32bd9d

Browse files
switch getlogin to getpass
1 parent 7e65b3d commit d32bd9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unix_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from rich import print
44
from rich.console import Console
55
import time
6-
import datetime
6+
import datetime, getpass
77
from colorama import Fore
88
from rich.table import Table
99
from rich.syntax import Syntax
@@ -12,7 +12,7 @@
1212
commands = ["touch", "mkdir", "ls", "cat"]
1313
path = os.getcwd()
1414
name = socket.gethostname()
15-
user = os.getlogin()
15+
user = getpass.getuser()
1616
path = path.replace("\\", "/")
1717
path = path.removeprefix("C:/Users/DEBARKA NASKAR/")
1818
now = datetime.datetime.now()

0 commit comments

Comments
 (0)