Skip to content

Commit 866f9f6

Browse files
author
6nz
authored
Now supports mac devices
1 parent f993471 commit 866f9f6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

main.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22

33
import sys
44
import time
5+
import platform
56
import os
67
import hashlib
78
from time import sleep
89
from datetime import datetime
910

10-
# import json as jsond
11+
# import json as jsonds
1112
# ^^ only for auto login/json writing/reading
1213

1314
# watch setup video if you need help https://www.youtube.com/watch?v=L2eAQOmuUiA
1415

15-
if os.name == 'nt':
16-
os.system('cls & title Python Example')
17-
else:
18-
os.system('clear')
19-
sys.stdout.write("\x1b]0;Python Example\x07")
16+
if platform.system() == 'Windows':
17+
os.system('cls & title Python Example') # clear console, change title
18+
elif platform.system() == 'Linux':
19+
os.system('clear') # clear console
20+
sys.stdout.write("\x1b]0;Python Example\x07") # change title
21+
elif platform.system() == 'Darwin':
22+
os.system("clear && printf '\e[3J'") # clear console
23+
os.system('''echo - n - e "\033]0;Python Example\007"''') # change title
2024

2125
print("Initializing")
2226

@@ -142,7 +146,7 @@ def answer():
142146
# * Auto-Login Example (THIS IS JUST AN EXAMPLE --> YOU WILL HAVE TO EDIT THE CODE PROBABLY)
143147
# 1. Checking and Reading JSON
144148

145-
#### Note: Remove the ''' on line 147 and 222
149+
#### Note: Remove the ''' on line 151 and 226
146150

147151
'''try:
148152
if os.path.isfile('auth.json'): #Checking if the auth file exist

0 commit comments

Comments
 (0)