xython 4.5.2__tar.gz → 4.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xython-4.5.2/src/xython.egg-info → xython-4.5.3}/PKG-INFO +1 -1
- {xython-4.5.2 → xython-4.5.3}/pyproject.toml +1 -1
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_auto.py +3 -3
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_chrome.py +12 -14
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_db.py +17 -17
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_excel.py +226 -226
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_map.py +3 -3
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_outlook.py +29 -25
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_time.py +3 -3
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_util.py +31 -31
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_word.py +39 -39
- {xython-4.5.2 → xython-4.5.3/src/xython.egg-info}/PKG-INFO +1 -1
- {xython-4.5.2 → xython-4.5.3}/MANIFEST.in +0 -0
- {xython-4.5.2 → xython-4.5.3}/README.md +0 -0
- {xython-4.5.2 → xython-4.5.3}/requirements.txt +0 -0
- {xython-4.5.2 → xython-4.5.3}/setup.cfg +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/__init__.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/_easy_start.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_color.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_common.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_edge.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_excel_event.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_hwp.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_list.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython/xy_re.py +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython.egg-info/SOURCES.txt +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython.egg-info/dependency_links.txt +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython.egg-info/requires.txt +0 -0
- {xython-4.5.2 → xython-4.5.3}/src/xython.egg-info/top_level.txt +0 -0
|
@@ -186,7 +186,7 @@ class xy_auto:
|
|
|
186
186
|
"""
|
|
187
187
|
def __init__(self):
|
|
188
188
|
self.varx = xy_common.xy_common().varx
|
|
189
|
-
self.
|
|
189
|
+
self.colorx = xy_color.xy_color()
|
|
190
190
|
|
|
191
191
|
def activate_edge_tab_by_title(self, keyword):
|
|
192
192
|
"""엣지 웹브라우저의 탭을 선택하는 것"""
|
|
@@ -493,8 +493,8 @@ class xy_auto:
|
|
|
493
493
|
handle = user32.GetDesktopWindow()
|
|
494
494
|
hdc = user32.GetDC(handle)
|
|
495
495
|
null_brush = gdi32.GetStockObject(5)
|
|
496
|
-
hex_color = self.
|
|
497
|
-
red_pen = gdi32.CreatePen(0, 2, self.
|
|
496
|
+
hex_color = self.colorx.change_xcolor_to_rgb(xcolor)
|
|
497
|
+
red_pen = gdi32.CreatePen(0, 2, self.colorx.change_rgb_to_hex_rgb(hex_color[0], hex_color[1], hex_color[2]))
|
|
498
498
|
old_brush = gdi32.SelectObject(hdc, null_brush)
|
|
499
499
|
old_pen = gdi32.SelectObject(hdc, red_pen)
|
|
500
500
|
gdi32.Rectangle(hdc, int(left), int(top), int(right), int(bottom))
|
|
@@ -68,9 +68,7 @@ class xy_chrome:
|
|
|
68
68
|
auto_connect: True = 자동으로 연결/실행, False = 수동
|
|
69
69
|
"""
|
|
70
70
|
# 공통 변수 설정
|
|
71
|
-
self.
|
|
72
|
-
self.xyre = xy_re.xy_re()
|
|
73
|
-
|
|
71
|
+
self.utilx = xy_util.xy_util()
|
|
74
72
|
self.chrome_paths = self._find_chrome_paths()
|
|
75
73
|
|
|
76
74
|
self.port = port
|
|
@@ -1300,7 +1298,7 @@ class xy_chrome:
|
|
|
1300
1298
|
html_code = self.get_html_code("https://info.bptc.co.kr/content/od/frame/yard_new_empty_frame_od_kr.jsp?p_id=EMPT_NE_KR&snb_num=8&snb_div=service&pop_ok=Y")
|
|
1301
1299
|
l3d = self.html_tables_to_list(html_code)
|
|
1302
1300
|
result = self.make_list_for_1(l3d)
|
|
1303
|
-
self.
|
|
1301
|
+
self.utilx.print_one_by_one(result)
|
|
1304
1302
|
return result
|
|
1305
1303
|
|
|
1306
1304
|
def port_2(self):
|
|
@@ -1313,7 +1311,7 @@ class xy_chrome:
|
|
|
1313
1311
|
con_type = l1d[0][2:]
|
|
1314
1312
|
for index, value in enumerate(l1d[1:]):
|
|
1315
1313
|
result.append([port, con_type, con_size, l2d[0][index + 1], value])
|
|
1316
|
-
self.
|
|
1314
|
+
self.utilx.print_one_by_one(result)
|
|
1317
1315
|
return result
|
|
1318
1316
|
|
|
1319
1317
|
def port_3(self):
|
|
@@ -1327,7 +1325,7 @@ class xy_chrome:
|
|
|
1327
1325
|
con_size = l2d[0][index + 1][:2]
|
|
1328
1326
|
con_type = l2d[0][index + 1][2:]
|
|
1329
1327
|
result.append([port, con_type, con_size, l1d[0], value])
|
|
1330
|
-
self.
|
|
1328
|
+
self.utilx.print_one_by_one(result)
|
|
1331
1329
|
return result
|
|
1332
1330
|
|
|
1333
1331
|
def port_4(self):
|
|
@@ -1341,7 +1339,7 @@ class xy_chrome:
|
|
|
1341
1339
|
con_size = l2d[0][index + 1][:2]
|
|
1342
1340
|
con_type = l2d[0][index + 1][2:]
|
|
1343
1341
|
result.append([port, con_type, con_size, l1d[0], value])
|
|
1344
|
-
self.
|
|
1342
|
+
self.utilx.print_one_by_one(result)
|
|
1345
1343
|
return result
|
|
1346
1344
|
|
|
1347
1345
|
def port_5(self):
|
|
@@ -1356,7 +1354,7 @@ class xy_chrome:
|
|
|
1356
1354
|
con_size = l2d[0][index + 1][:2]
|
|
1357
1355
|
con_type = l2d[0][index + 1][2:]
|
|
1358
1356
|
result.append([port, con_type, con_size, l1d[0], value])
|
|
1359
|
-
self.
|
|
1357
|
+
self.utilx.print_one_by_one(result)
|
|
1360
1358
|
return result
|
|
1361
1359
|
|
|
1362
1360
|
def port_6(self):
|
|
@@ -1371,14 +1369,14 @@ class xy_chrome:
|
|
|
1371
1369
|
con_size = l2d[0][index + 1]
|
|
1372
1370
|
con_type = ""
|
|
1373
1371
|
result.append([port, con_type, con_size, l1d[0], value])
|
|
1374
|
-
self.
|
|
1372
|
+
self.utilx.print_one_by_one(result)
|
|
1375
1373
|
return result
|
|
1376
1374
|
|
|
1377
1375
|
def port_7(self):
|
|
1378
1376
|
html_code = self.get_html_code("https://snct.sun-kwang.co.kr/infoservice/webpage/main/mainPage_iframe.jsp?type=IFRAME_EMPTY_ALL")
|
|
1379
1377
|
l2d = self.html_tables_to_list(html_code)[-1]
|
|
1380
1378
|
result = self.make_list_7(l2d)
|
|
1381
|
-
self.
|
|
1379
|
+
self.utilx.print_one_by_one(result)
|
|
1382
1380
|
return result
|
|
1383
1381
|
|
|
1384
1382
|
def port_9(self):
|
|
@@ -1405,7 +1403,7 @@ class xy_chrome:
|
|
|
1405
1403
|
l2d.append(str(one_line).split("\t"))
|
|
1406
1404
|
for no in range(1, len(l2d[0])):
|
|
1407
1405
|
result.append(["style10", l2d[2][no], l2d[1][no], l2d[0][no], l2d[3][no]])
|
|
1408
|
-
self.
|
|
1406
|
+
self.utilx.print_one_by_one(result)
|
|
1409
1407
|
return result
|
|
1410
1408
|
|
|
1411
1409
|
def port_11(self):
|
|
@@ -1426,7 +1424,7 @@ class xy_chrome:
|
|
|
1426
1424
|
con_type = l1d[0][2:]
|
|
1427
1425
|
for index, value in enumerate(l1d[1:]):
|
|
1428
1426
|
result.append(["style11", con_type, con_size, l2d[0][index + 1], value])
|
|
1429
|
-
self.
|
|
1427
|
+
self.utilx.print_one_by_one(result)
|
|
1430
1428
|
return result
|
|
1431
1429
|
|
|
1432
1430
|
def port_12(self):
|
|
@@ -1452,7 +1450,7 @@ class xy_chrome:
|
|
|
1452
1450
|
for index, value in enumerate(l1d):
|
|
1453
1451
|
result.append(["style12", "", l2d[0][index] if index < len(l2d[0]) else "", l1d[0], value])
|
|
1454
1452
|
|
|
1455
|
-
self.
|
|
1453
|
+
self.utilx.print_one_by_one(result)
|
|
1456
1454
|
return result
|
|
1457
1455
|
|
|
1458
1456
|
def port_13(self):
|
|
@@ -1475,7 +1473,7 @@ class xy_chrome:
|
|
|
1475
1473
|
# [FIX] 기존: ["style13", "DRY", l2d[1][index], l1d[0], value]
|
|
1476
1474
|
# 수정: con_size, con_type 을 정상 사용, 선사는 l2d[1][index+1]
|
|
1477
1475
|
result.append(["style13", con_type, con_size, l2d[1][index + 1] if (index + 1) < len(l2d[1]) else "", value])
|
|
1478
|
-
self.
|
|
1476
|
+
self.utilx.print_one_by_one(result)
|
|
1479
1477
|
return result
|
|
1480
1478
|
|
|
1481
1479
|
def port_15(self):
|
|
@@ -15,8 +15,8 @@ class xy_db:
|
|
|
15
15
|
|
|
16
16
|
def __init__(self, db_name=""):
|
|
17
17
|
self.db_name = db_name
|
|
18
|
-
self.
|
|
19
|
-
self.
|
|
18
|
+
self.utilx = xy_util.xy_util()
|
|
19
|
+
self.excel = xy_excel.xy_excel()
|
|
20
20
|
|
|
21
21
|
self.table_name = ""
|
|
22
22
|
self.con = "" # sqlite db에 연결되는 것
|
|
@@ -289,8 +289,8 @@ class xy_db:
|
|
|
289
289
|
:return:
|
|
290
290
|
"""
|
|
291
291
|
|
|
292
|
-
input_l2d = self.
|
|
293
|
-
listdb = self.
|
|
292
|
+
input_l2d = self.utilx.check_data_types_for_l2d(input_l2d) # 2차원이 아닐때 2차원으로 만들러 주는것
|
|
293
|
+
listdb = self.utilx.change_xylist_to_yxlist(input_l2d)
|
|
294
294
|
return listdb
|
|
295
295
|
|
|
296
296
|
def change_list_to_listdb(self, input_list):
|
|
@@ -340,8 +340,8 @@ class xy_db:
|
|
|
340
340
|
temp = []
|
|
341
341
|
result = {}
|
|
342
342
|
if type(listdb) == type([]):
|
|
343
|
-
listdb = self.
|
|
344
|
-
listdb = self.
|
|
343
|
+
listdb = self.utilx.check_data_types_for_l2d(listdb) # 2차원이 아닐때 2차원으로 만들러 주는것
|
|
344
|
+
listdb = self.utilx.change_l2d_to_l2d_as_same_len(listdb) # 길이가 다를때 제일 긴것으로 똑같이 만들어 주는것
|
|
345
345
|
# 별도로 column의 제목이 없다면, 1번부터 시작하는 번호를 넣어준다
|
|
346
346
|
if col_list == "":
|
|
347
347
|
for index, l1d in enumerate(listdb):
|
|
@@ -634,7 +634,7 @@ class xy_db:
|
|
|
634
634
|
:param path: 경로
|
|
635
635
|
:return:
|
|
636
636
|
"""
|
|
637
|
-
db_name_all = self.
|
|
637
|
+
db_name_all = self.utilx.get_all_filename_in_folder(path)
|
|
638
638
|
if db_name in db_name_all:
|
|
639
639
|
result = db_name
|
|
640
640
|
else:
|
|
@@ -1305,19 +1305,19 @@ class xy_db:
|
|
|
1305
1305
|
x_len = 10
|
|
1306
1306
|
y_len = 12
|
|
1307
1307
|
|
|
1308
|
-
self.
|
|
1308
|
+
self.excel.new_sheet()
|
|
1309
1309
|
for index in range(1, y_len + 1):
|
|
1310
1310
|
y_title_list.append("title_" + str(index))
|
|
1311
1311
|
|
|
1312
|
-
self.
|
|
1312
|
+
self.excel.write_l1d_from_cell("", [1, 2], y_title_list)
|
|
1313
1313
|
for no1 in range(1, x_len + 1):
|
|
1314
1314
|
for no2 in range(1, y_len + 1):
|
|
1315
|
-
self.
|
|
1315
|
+
self.excel.write_value_in_cell("", [no1 + 1, no2 + 1], no1 * 10 + no2)
|
|
1316
1316
|
|
|
1317
1317
|
x_title_list = []
|
|
1318
1318
|
for index in range(1, x_len + 1):
|
|
1319
1319
|
x_title_list.append("줄_" + str(index))
|
|
1320
|
-
self.
|
|
1320
|
+
self.excel.write_l1d_from_cell_as_yline("", [2, 1], x_title_list)
|
|
1321
1321
|
|
|
1322
1322
|
def make_cursor_for_sqlite_db(self, db_name=""):
|
|
1323
1323
|
"""
|
|
@@ -1431,7 +1431,7 @@ class xy_db:
|
|
|
1431
1431
|
"""
|
|
1432
1432
|
result = []
|
|
1433
1433
|
line_len = len(input_l2d)
|
|
1434
|
-
y_len = self.
|
|
1434
|
+
y_len = self.utilx.get_max_len_for_l2d(input_l2d)
|
|
1435
1435
|
title_list = []
|
|
1436
1436
|
type_list = []
|
|
1437
1437
|
for no in range(1, y_len + 1):
|
|
@@ -1474,7 +1474,7 @@ class xy_db:
|
|
|
1474
1474
|
:param col_list: y컬럼 이름들
|
|
1475
1475
|
:return:
|
|
1476
1476
|
"""
|
|
1477
|
-
sql_columns = self.
|
|
1477
|
+
sql_columns = self.utilx.change_l1d_to_text_with_chain_word(col_list, ", ")
|
|
1478
1478
|
sql_values = "?," * len(col_list)
|
|
1479
1479
|
result = "insert into %s (%s) values (%s)" % (table_name, sql_columns, sql_values[:-1])
|
|
1480
1480
|
return result
|
|
@@ -1992,7 +1992,7 @@ class xy_db:
|
|
|
1992
1992
|
if y_title_s == "":
|
|
1993
1993
|
sql_columns = "*"
|
|
1994
1994
|
else:
|
|
1995
|
-
sql_columns = self.
|
|
1995
|
+
sql_columns = self.utilx.change_l1d_to_text_with_chain_word(y_title_s, ", ")
|
|
1996
1996
|
if condition == "all":
|
|
1997
1997
|
lim_no = 100
|
|
1998
1998
|
else:
|
|
@@ -2168,7 +2168,7 @@ class xy_db:
|
|
|
2168
2168
|
def split_l2d_as_data_x_title_yline_title(self, input_l2d, x_title_len, y_title_len):
|
|
2169
2169
|
"""
|
|
2170
2170
|
2줄이상의 제목이 들어갈수있을것같아, 2차원의 자료로 만들었다
|
|
2171
|
-
l2d = self.
|
|
2171
|
+
l2d = self.utilx.check_l2d(input_l2d)
|
|
2172
2172
|
|
|
2173
2173
|
:param input_l2d:
|
|
2174
2174
|
:param x_title_len:
|
|
@@ -2232,8 +2232,8 @@ class xy_db:
|
|
|
2232
2232
|
"""
|
|
2233
2233
|
col_list = input_df.columns.values.tolist()
|
|
2234
2234
|
value_list = input_df.values.tolist()
|
|
2235
|
-
self.
|
|
2236
|
-
self.
|
|
2235
|
+
self.excel.write_l1d_from_cell_as_yline("", xy, col_list)
|
|
2236
|
+
self.excel.write_value_in_range_as_speedy("", [xy[0] + 1, xy[1]], value_list)
|
|
2237
2237
|
|
|
2238
2238
|
def write_dataframe_to_sqlite(self, db_name, table_name, input_df):
|
|
2239
2239
|
"""
|