Skip to content

Commit ff490c5

Browse files
authored
Update ozel_program_baslangici.py
1 parent 486ad47 commit ff490c5

File tree

1 file changed

+49
-32
lines changed

1 file changed

+49
-32
lines changed

Diff for: ozel_program_baslangici.py

+49-32
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,54 @@
1+
# -*- coding: utf-8 -*-
12
from termcolor import cprint
23
import os
34
import time
5+
import sys
46

5-
def yukleme():
6-
i = 1
7-
while i < 10:
8-
cprint("Yükleniyor.",color="green")
9-
time.sleep(0.2)
10-
os.system("clear")
11-
cprint("Yükleniyor..",color="red")
12-
time.sleep(0.2)
13-
os.system("clear")
14-
cprint("Yükleniyor...",color="blue")
15-
time.sleep(0.2)
16-
i = i + 1
17-
os.system("clear")
7+
CURSOR_UP_ONE = '\x1b[1A'
8+
ERASE_LINE = '\x1b[2K'
9+
10+
class giris:
1811

19-
def logo():
20-
os.system("clear")
21-
cprint(" _ _____ ____ ____ _ ____ ____ ",color="green")
22-
time.sleep(0.5)
23-
cprint("| |/ / _ \| _ \ _ | _ \ / \ | _ \/ ___| ",color="green")
24-
time.sleep(0.5)
25-
cprint("| ' / | | | | | (_) | |_) / _ \ | |_) \___ \ ",color="green")
26-
time.sleep(0.5)
27-
cprint("| . \ |_| | |_| |_ | __/ ___ \| _ < ___) |",color="green")
28-
time.sleep(0.5)
29-
cprint("|_|\_\___/|____/(_) |_| /_/ \_\_| \_\____/ ",color="green")
30-
time.sleep(0.5)
31-
cprint(" ",color="green")
32-
def uyari():
33-
cprint("BU PROGRAMI KULLANARAK SORUMLULUĞU ÜSTLENMİŞ OLURSUNUZ!!!\n",color="red", attrs=["bold",'underline'])
34-
time.sleep(1)
35-
yukleme()
36-
logo()
37-
uyari()
12+
@staticmethod
13+
def yukleme():
14+
i = 1
15+
while i < 10:
16+
cprint("Yükleniyor.",color="green")
17+
time.sleep(0.2)
18+
sys.stdout.write(CURSOR_UP_ONE)
19+
sys.stdout.write(ERASE_LINE)
20+
cprint("Yükleniyor..",color="red")
21+
time.sleep(0.2)
22+
sys.stdout.write(CURSOR_UP_ONE)
23+
sys.stdout.write(ERASE_LINE)
24+
cprint("Yükleniyor...",color="blue")
25+
time.sleep(0.2)
26+
i = i + 1
27+
sys.stdout.write(CURSOR_UP_ONE)
28+
sys.stdout.write(ERASE_LINE)
29+
30+
@staticmethod
31+
def logo():
32+
cprint(r" _ _____ ____ ____ _ ____ ____ ",color="green")
33+
time.sleep(0.3)
34+
cprint(r"| |/ / _ \| _ \ _ | _ \ / \ | _ \/ ___| ",color="green")
35+
time.sleep(0.3)
36+
cprint(r"| ' / | | | | | (_) | |_) / _ \ | |_) \___ \ ",color="green")
37+
time.sleep(0.3)
38+
cprint(r"| . \ |_| | |_| |_ | __/ ___ \| _ < ___) |",color="green")
39+
time.sleep(0.3)
40+
cprint(r"|_|\_\___/|____/(_) |_| /_/ \_\_| \_\____/ ",color="green")
41+
time.sleep(0.3)
42+
cprint(" ",color="green")
43+
44+
@staticmethod
45+
def uyari():
46+
cprint("BU PROGRAMI KULLANARAK SORUMLULUĞU ÜSTLENMİŞ OLURSUNUZ!!!\n",
47+
color="red", attrs=["bold",'underline'])
48+
time.sleep(1)
49+
50+
51+
if __name__ == "__main__":
52+
giris.yukleme()
53+
giris.logo()
54+
giris.uyari()

0 commit comments

Comments
 (0)