Initialize getters for Chrome software and general ones; Fix some examples for chrome
This commit is contained in:
15
desktop_env/evaluators/metrics/general.py
Normal file
15
desktop_env/evaluators/metrics/general.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
|
||||
# todo: move to getter module
|
||||
def get_desktop_path():
|
||||
username = os.getlogin() # Get the current username
|
||||
if platform.system() == "Windows":
|
||||
return os.path.join("C:", "Users", username, "Desktop")
|
||||
elif platform.system() == "Darwin": # macOS is identified as 'Darwin'
|
||||
return os.path.join("/Users", username, "Desktop")
|
||||
elif platform.system() == "Linux":
|
||||
return os.path.join("/home", username, "Desktop")
|
||||
else:
|
||||
raise Exception("Unsupported operating system")
|
||||
Reference in New Issue
Block a user