Skip to content

Commit 17ee274

Browse files
Add files via upload
1 parent 8e1d5fd commit 17ee274

File tree

4 files changed

+180
-5
lines changed

4 files changed

+180
-5
lines changed

pyappdevkit/__init__.py

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
#!/usr/bin/python3
2+
""" Copyright© 2023-2025 LinuxUsersLinuxMint
3+
PyAppDevKit Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+
PyAppDevKit All Rights Reserved under the GPL(General Public License).
5+
Bu Yazılımın Bir Kopyası GitHub da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/PyAppDevKit
6+
A Copy of This Software is published on GitHub To view: https://github.com/LinuxUsersLinuxMint/PyAppDevKit"""
7+
8+
from pyappdevkit.parameters import *
9+
import os
10+
11+
"""
12+
TR:
13+
Uyarı: time() fonksiyonu gerçek bir zaman ölçümü yapmaz bunun yerine döngü oluşturarak bekleme süresi oluşturur bu yüzden bekleme süresi belirtilen süreden farklı olabilir. Eğer gerçek bir zaman ölçümü yapmak istiyorsanız bunun yerine Python programlama dilinde yerleşik olarak gelen time kütüphanesini kullanınız.
14+
15+
EN:
16+
Warning: the time() function does not measure actual time, instead it loops and creates a waiting time, so the waiting time may be different from the specified time. If you want to measure real time, use the time library built into the Python programming language instead.
17+
"""
18+
19+
def time(number,unit):
20+
while number > 0:
21+
number -= 1
22+
if unit == MS or unit == MILISECOND:
23+
for _ in range(100000):
24+
pass
25+
elif unit == S or unit == SECOND:
26+
for _ in range(100000000):
27+
pass
28+
elif unit == M or unit == MINUTE:
29+
for _ in range(100000000*60):
30+
pass
31+
elif unit == H or unit == HOUR:
32+
for _ in range(100000000*60*60):
33+
pass
34+
35+
def file(file_name,file_mode,file_write):
36+
create_file = open(file_name, file_mode)
37+
if file_mode == "w" or file_mode == "a":
38+
create_file.write("{0}\n". format(file_write))
39+
elif file_mode == "r":
40+
print(create_file.read())
41+
42+
def file_remove(file_name,file_path):
43+
if file_name != 0 or file_name != "":
44+
os.remove(file_name)
45+
else:
46+
os.remove(r"{0}". format(file_path))
47+
48+
def error_msg(error_dialog,error_code,support_link):
49+
print(error_dialog,error_code,support_link)
50+
51+
def exit_program_dialog_time(exit_dialog_msg,userTime,unit):
52+
print(exit_dialog_msg)
53+
time(userTime,unit=unit)
54+
exit()
55+
56+
def exit_program_time(userTime,unit):
57+
time(userTime,unit=unit)
58+
exit()
59+
60+
def exit_program_dialog(exit_dialog_msg):
61+
print(exit_dialog_msg)
62+
exit()
63+
64+
def all_exit(dialog_switch,lang,ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog,unit):
65+
if dialog_switch == ON:
66+
exit_select = int(input(ExitSelectDialog))
67+
if exit_select == 0:
68+
userTime = int(input(userTimeDialog))
69+
exit_program_dialog_time(exitDialog, userTime,unit=unit)
70+
elif exit_select == 1:
71+
userTime = int(input(userTimeDialog))
72+
exit_program_time(userTime,unit=unit)
73+
elif exit_select == 2:
74+
exit_program_dialog(exitDialog)
75+
elif exit_select == 3:
76+
exit()
77+
else:
78+
error_msg(errormsgDialog,"","")
79+
elif dialog_switch == OFF:
80+
if lang == EN:
81+
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)): "))
82+
if exit_select == 0:
83+
userTime = int(input("After how many seconds should the program be closed?: "))
84+
exit_program_dialog_time("Exit program...", userTime,unit=unit)
85+
elif exit_select == 1:
86+
userTime = int(input("After how many seconds should the program be closed?: "))
87+
exit_program_time(userTime,unit=unit)
88+
elif exit_select == 2:
89+
exit_program_dialog("Exit program...")
90+
elif exit_select == 3:
91+
exit()
92+
else:
93+
error_msg("Invalid Command!","","")
94+
elif lang == TR:
95+
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)): "))
96+
if exit_select == 0:
97+
userTime = int(input("Program kaç saniye sonra kapatılmalıdır?: "))
98+
exit_program_dialog_time("Programdan çıkılıyor...", userTime,unit=unit)
99+
elif exit_select == 1:
100+
userTime = int(input("Program kaç saniye sonra kapatılmalıdır?: "))
101+
exit_program_time(userTime,unit=unit)
102+
elif exit_select == 2:
103+
exit_program_dialog("Programdan çıkılıyor...")
104+
elif exit_select == 3:
105+
exit()
106+
else:
107+
error_msg("Geçersiz Komut!","","")
108+
109+
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):
110+
print("{0} {1}". format(dialog_one,dialog_one_t))
111+
print("{0} {1}". format(dialog_two,dialog_two_t))
112+
print("{0} {1}". format(dialog_three,dialog_three_t))
113+
print("{0} {1}". format(dialog_four,dialog_four_t))
114+
print("{0} {1}". format(dialog_five,dialog_five_t))
115+
print("{0} {1}". format(dialog_six,dialog_six_t))
116+
print("{0} {1}". format(dialog_seven,dialog_seven_t))
117+
print("{0} {1}". format(dialog_eigth,dialog_eight_t))
118+
print("{0} {1}". format(dialog_nine,dialog_nine_t))
119+
print("{0} {1}". format(dialog_ten,dialog_ten_t))
120+
121+
def program_welcome_msg(welcome_msg,cfg,cfg_,appname,libname,websitelink):
122+
print(welcome_msg)
123+
if cfg == 1:
124+
print(websitelink)
125+
elif cfg == 0:
126+
if cfg_ == "lib":
127+
app_info("Library Name: ",libname,"","","","","","","","","","","","","","","","","","")
128+
elif cfg_ == "app":
129+
app_info("Program Name: ",appname,"","","","","","","","","","","","","","","","","","")
130+
else:
131+
error_msg("Invalid definition!","","")

pyappdevkit/parameters.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/python3
2+
3+
# Open/Close
4+
5+
ON="ON"
6+
OFF="OFF"
7+
8+
# Lang
9+
10+
EN="EN"
11+
TR="TR"
12+
13+
# Time units
14+
15+
MILISECOND="MILISECOND"
16+
MS="MS"
17+
SECOND="SECOND"
18+
S="S"
19+
MINUTE="MINUTE"
20+
M="M"
21+
HOUR="HOUR"
22+
H="H"

pyappdevkit/pyappdevkit_info.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/python3
2+
""" Copyright© 2023-2025 LinuxUsersLinuxMint
3+
PyAppDevKit Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+
PyAppDevKit All Rights Reserved under the GPL(General Public License).
5+
Bu Yazılımın Bir Kopyası GitHub da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/PyAppDevKit
6+
A Copy of This Software is published on GitHub To view: https://github.com/LinuxUsersLinuxMint/PyAppDevKit"""
7+
8+
import pyappdevkit
9+
10+
PYTHON_LIB_NAME="PyAppDevKit"
11+
PYTHON_LIB_LICENCE="GPL2"
12+
PYTHON_LIB_IMPLEMENTED_CONTRACTS="LinuxUsersLinuxMint Privacy and Security Agreement , LinuxUsersLinuxMint Web Site Agreement"
13+
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.1.4"
15+
PYTHON_LIB_SUPPORT_PLATFORM="Windows/Linux/macOS/otherOS"
16+
PYTHON_LIB_RELEASE_DATE="6/9/2024, Time: 17:54"
17+
PYTHON_LIB_LAST_UPDATE_DATE="5/24/2025, Time: 00:35 / 12:35 AM"
18+
PYTHON_LIB_AUTHOR="LinuxUsersLinuxMint"
19+
PYTHON_LIB_AUTHOR_WEB_SITE="https://linuxuserslinuxmint.github.io"
20+
21+
def LibAbout():
22+
pyappdevkit.app_info("Python Library Name:",PYTHON_LIB_NAME,"Python Library Version:",PYTHON_LIB_VER,"Python Library Support OS:",PYTHON_LIB_SUPPORT_PLATFORM,"Python Library Licence Name:",PYTHON_LIB_LICENCE,"Python Library Implemented Contracts:",PYTHON_LIB_IMPLEMENTED_CONTRACTS,"Python Library Implemented Contracts Web Site:",PYTHON_LIB_IMPLEMENTED_CONTRACTS_WEB_SITE,"Python Library Author Name:",PYTHON_LIB_AUTHOR,"Python Library Author Web Site:",PYTHON_LIB_AUTHOR_WEB_SITE,"Python Library Release Date:",PYTHON_LIB_RELEASE_DATE,"Python Library Last Update Date:",PYTHON_LIB_LAST_UPDATE_DATE)

test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from PyAppDevKit.pyappdevkit import *
1+
import pyappdevkit
22

3-
app_info("NAME:","TEST [PROGRAM_LIBRARY_INFO]","","","","","","","","","","","","","","","","","","")
3+
pyappdevkit.app_info("NAME:","TEST [PROGRAM_LIBRARY_INFO]","","","","","","","","","","","","","","","","","","")
44

5-
file(file_name="test.txt",file_mode="w",file_write="test1")
6-
file(file_name="test.txt",file_mode="a",file_write="test2")
7-
file(file_name="test.txt",file_mode="r",file_write="")
5+
pyappdevkit.file(file_name="test.txt",file_mode="w",file_write="test1")
6+
pyappdevkit.file(file_name="test.txt",file_mode="a",file_write="test2")
7+
pyappdevkit.file(file_name="test.txt",file_mode="r",file_write="")

0 commit comments

Comments
 (0)