Skip to content

Commit c5ac340

Browse files
Update PyAppDevKit.
1 parent 17b218b commit c5ac340

File tree

5 files changed

+53
-28
lines changed

5 files changed

+53
-28
lines changed

LibFunc/switch.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

PyAppDevKit/parameters.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/python3
2+
3+
ON="ON"
4+
OFF="ON"
5+
EN="EN"
6+
TR="TR"
7+
MILISECOND="MILISECOND"
8+
MS="MS"
9+
SECOND="SECOND"
10+
S="S"
11+
MINUTE="MINUTE"
12+
M="M"
13+
HOUR="HOUR"
14+
H="H"

LibFunc/pyappdevkit.py renamed to PyAppDevKit/pyappdevkit.py

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,24 @@
55
Bu Yazılımın Bir Kopyası GitHub da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/PyAppDevKit
66
A Copy of This Software is published on GitHub To view: https://github.com/LinuxUsersLinuxMint/PyAppDevKit"""
77

8-
from LibFunc.switch import *
8+
from PyAppDevKit.parameters import *
9+
import os
910

10-
def time(number):
11+
def time(number,unit):
1112
while number > 0:
1213
number -= 1
13-
for _ in range(100000000):
14-
pass
14+
if unit == MS or unit == MILISECOND:
15+
for _ in range(100000):
16+
pass
17+
elif unit == S or unit == SECOND:
18+
for _ in range(100000000):
19+
pass
20+
elif unit == M or unit == MINUTE:
21+
for _ in range(100000000*60):
22+
pass
23+
elif unit == H or unit == HOUR:
24+
for _ in range(100000000*60*60):
25+
pass
1526

1627
def file(file_name,file_mode,file_write):
1728
create_file = open(file_name, file_mode)
@@ -20,16 +31,22 @@ def file(file_name,file_mode,file_write):
2031
elif file_mode == "r":
2132
print(create_file.read())
2233

34+
def file_remove(file_name,file_path):
35+
if file_name != 0 or file_name != "":
36+
os.remove(file_name)
37+
else:
38+
os.remove(r"{0}". format(file_path))
39+
2340
def error_msg(error_dialog,error_code,support_link):
2441
print(error_dialog,error_code,support_link)
2542

26-
def exit_program_dialog_time(exit_dialog_msg,userTime):
43+
def exit_program_dialog_time(exit_dialog_msg,userTime,unit):
2744
print(exit_dialog_msg)
28-
time(userTime)
45+
time(userTime,unit=unit)
2946
exit()
3047

31-
def exit_program_time(userTime):
32-
time(userTime)
48+
def exit_program_time(userTime,unit):
49+
time(userTime,unit=unit)
3350
exit()
3451

3552
def exit_program_dialog(exit_dialog_msg):
@@ -41,50 +58,50 @@ def exit_program_dialog(exit_dialog_msg):
4158
Example Dialog (exitDialog): "Exit program..."
4259
Example Dialog (errormsgDialog): "Invalid Command!" """
4360

44-
def all_exit(dialog_switch,lang,ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog):
61+
def all_exit(dialog_switch,lang,ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog,unit):
4562
if dialog_switch == ON:
4663
exit_select = int(input(ExitSelectDialog))
4764
if exit_select == 0:
4865
userTime = int(input(userTimeDialog))
49-
exit_program_dialog_time(exitDialog, userTime)
66+
exit_program_dialog_time(exitDialog, userTime,unit=unit)
5067
elif exit_select == 1:
5168
userTime = int(input(userTimeDialog))
52-
exit_program_time(userTime)
69+
exit_program_time(userTime,unit=unit)
5370
elif exit_select == 2:
5471
exit_program_dialog(exitDialog)
5572
elif exit_select == 3:
5673
exit()
5774
else:
58-
print(errormsgDialog)
75+
error_msg(errormsgDialog,"","")
5976
elif dialog_switch == OFF:
6077
if lang == EN:
6178
exit_select = int(input("Select the method to exit the program (0: Dialogue and Time entry, 1: Time entry only, 2: Dialogue entry only, 3: Normal exit (old style)): "))
6279
if exit_select == 0:
6380
userTime = int(input("After how many seconds should the program be closed?: "))
64-
exit_program_dialog_time("Exit program...", userTime)
81+
exit_program_dialog_time("Exit program...", userTime,unit=unit)
6582
elif exit_select == 1:
6683
userTime = int(input("After how many seconds should the program be closed?: "))
67-
exit_program_time(userTime)
84+
exit_program_time(userTime,unit=unit)
6885
elif exit_select == 2:
6986
exit_program_dialog("Exit program...")
7087
elif exit_select == 3:
7188
exit()
7289
else:
73-
print("Invalid Command!")
90+
error_msg("Invalid Command!","","")
7491
elif lang == TR:
7592
exit_select = int(input("Programdan çıkış yöntemini seçin (0: Diyalog ve Zaman girişi, 1: Yalnızca zaman girişi, 2: Yalnızca diyalog girişi, 3: Normal çıkış (eski stil)): "))
7693
if exit_select == 0:
7794
userTime = int(input("Program kaç saniye sonra kapatılmalıdır?: "))
78-
exit_program_dialog_time("Programdan çıkılıyor...", userTime)
95+
exit_program_dialog_time("Programdan çıkılıyor...", userTime,unit=unit)
7996
elif exit_select == 1:
8097
userTime = int(input("Program kaç saniye sonra kapatılmalıdır?: "))
81-
exit_program_time(userTime)
98+
exit_program_time(userTime,unit=unit)
8299
elif exit_select == 2:
83100
exit_program_dialog("Programdan çıkılıyor...")
84101
elif exit_select == 3:
85102
exit()
86103
else:
87-
print("Geçersiz Komut!")
104+
error_msg("Geçersiz Komut!","","")
88105

89106
def app_info(dialog_one,dialog_one_t,dialog_two,dialog_two_t,dialog_three,dialog_three_t,dialog_four,dialog_four_t,dialog_five,dialog_five_t,dialog_six,dialog_six_t,dialog_seven,dialog_seven_t,dialog_eigth,dialog_eight_t,dialog_nine,dialog_nine_t,dialog_ten,dialog_ten_t):
90107
print("{0} {1}". format(dialog_one,dialog_one_t))

LibFunc/pyappdevkit_info.py renamed to PyAppDevKit/pyappdevkit_info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
Bu Yazılımın Bir Kopyası GitHub da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/PyAppDevKit
66
A Copy of This Software is published on GitHub To view: https://github.com/LinuxUsersLinuxMint/PyAppDevKit"""
77

8-
from LibFunc.pyappdevkit import *
8+
from PyAppDevKit.pyappdevkit import *
99

1010
PYTHON_LIB_NAME="PyAppDevKit"
1111
PYTHON_LIB_LICENCE="GPL2"
1212
PYTHON_LIB_IMPLEMENTED_CONTRACTS="LinuxUsersLinuxMint Privacy and Security Agreement , LinuxUsersLinuxMint Web (Site) Agreement"
1313
PYTHON_LIB_IMPLEMENTED_CONTRACTS_WEB_SITE="https://linuxuserslinuxmint.github.io/Contracts/privacyandsecutryagreement/privacyandsecutryagreement.html , https://linuxuserslinuxmint.github.io/Contracts/linuxuserslinuxmintwebsiteagreement/linuxuserslinuxmintwebsiteagreement.html"
14-
PYTHON_LIB_VER="2.0"
14+
PYTHON_LIB_VER="2.1"
1515
PYTHON_LIB_SUPPORT_PLATFORM="Windows/Linux/macOS/otherOS"
1616
PYTHON_LIB_RELEASE_DATE="6/9/2024, Time: 17:54"
17-
PYTHON_LIB_LAST_UPDATE_DATE="3/16/2025, Time: 02:00 / 2:00 AM"
17+
PYTHON_LIB_LAST_UPDATE_DATE="3/31/2025, Time: 19:37 / 7:37 PM"
1818
PYTHON_LIB_AUTHOR="LinuxUsersLinuxMint"
1919
PYTHON_LIB_AUTHOR_WEB_SITE="https://linuxuserslinuxmint.github.io"
2020

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from LibFunc.pyappdevkit import *
1+
from PyAppDevKit.pyappdevkit import *
22

33
app_info("NAME:","TEST [PROGRAM_LIBRARY_INFO]","","","","","","","","","","","","","","","","","","")
44

0 commit comments

Comments
 (0)