xython 4.0.9__tar.gz → 4.2.0__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.
Files changed (39) hide show
  1. {xython-4.0.9/src/xython.egg-info → xython-4.2.0}/PKG-INFO +1 -1
  2. {xython-4.0.9 → xython-4.2.0}/setup.py +1 -1
  3. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_auto.py +14 -0
  4. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_common.py +39 -4
  5. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_db.py +20 -20
  6. xython-4.2.0/src/xython/xy_excel.py +20198 -0
  7. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_re.py +99 -98
  8. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_time.py +22 -2
  9. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_util.py +56 -4
  10. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_word.py +30 -30
  11. {xython-4.0.9 → xython-4.2.0/src/xython.egg-info}/PKG-INFO +1 -1
  12. {xython-4.0.9 → xython-4.2.0}/src/xython.egg-info/SOURCES.txt +0 -5
  13. xython-4.0.9/src/xython/xy_excel.py +0 -26910
  14. xython-4.0.9/src/xython/xy_grid_model.py +0 -1256
  15. xython-4.0.9/src/xython/xy_grid_original.py +0 -3815
  16. xython-4.0.9/src/xython/xy_grid_widget.py +0 -1641
  17. xython-4.0.9/src/xython/xy_hwp_common.py +0 -2043
  18. xython-4.0.9/src/xython/xy_map_common.py +0 -22478
  19. {xython-4.0.9 → xython-4.2.0}/MANIFEST.in +0 -0
  20. {xython-4.0.9 → xython-4.2.0}/README.md +0 -0
  21. {xython-4.0.9 → xython-4.2.0}/requirements.txt +0 -0
  22. {xython-4.0.9 → xython-4.2.0}/setup.cfg +0 -0
  23. {xython-4.0.9 → xython-4.2.0}/src/xython/__init__.py +0 -0
  24. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_chart.py +0 -0
  25. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_color.py +0 -0
  26. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_common_hwp.py +0 -0
  27. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_common_map.py +0 -0
  28. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_example.py +0 -0
  29. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_excel_event.py +0 -0
  30. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_grid.py +0 -0
  31. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_hwp.py +0 -0
  32. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_list.py +0 -0
  33. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_map.py +0 -0
  34. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_outlook.py +0 -0
  35. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_util2.py +0 -0
  36. {xython-4.0.9 → xython-4.2.0}/src/xython/xy_web.py +0 -0
  37. {xython-4.0.9 → xython-4.2.0}/src/xython.egg-info/dependency_links.txt +0 -0
  38. {xython-4.0.9 → xython-4.2.0}/src/xython.egg-info/not-zip-safe +0 -0
  39. {xython-4.0.9 → xython-4.2.0}/src/xython.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xython
3
- Version: 4.0.9
3
+ Version: 4.2.0
4
4
  Summary: win32com + python + Office Automation = xython, (for easy automation for excel, word, outlook, regex, color, hwp, etc BY python & win32com)
5
5
  Home-page: https://www.xython.co.kr
6
6
  Author: sj park
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
5
5
  # long_description = fh.read()
6
6
  setup(
7
7
  name='xython',
8
- version='4.0.9',
8
+ version='4.2.0',
9
9
  url='https://www.xython.co.kr',
10
10
  install_requires=[],
11
11
  author='sj park',
@@ -2276,6 +2276,20 @@ information : 어떤것에대한 이런저런 정보
2276
2276
  return False
2277
2277
 
2278
2278
 
2279
+ def find_image_on_all_monitors(self, image_path, confidence=0.9):
2280
+ import pyautogui
2281
+ from screeninfo import get_monitors
2282
+ # 모니터의 어디든 그림 찾기
2283
+ found_locations = []
2284
+ monitors = get_monitors()
2285
+
2286
+ for i, monitor in enumerate(monitors):
2287
+ monitor_region = (monitor.x, monitor.y, monitor.width, monitor.height)
2288
+ location = pyautogui.locateOnScreen(image_path, region=monitor_region, confidence=confidence)
2289
+ if location:
2290
+ found_locations.append({"monitor_id": monitor.id, "box": location})
2291
+
2292
+ return found_locations
2279
2293
 
2280
2294
 
2281
2295
 
@@ -4457,13 +4457,13 @@ excelx.paint_min_value_in_range_in_each_xline("", xyxy)
4457
4457
  "a와 b사이의 모든문자 찾기": [4, "a[문자:1~]b", "type_z0"],
4458
4458
  "a또는b또는c": [4, "a[또는]b[또는]c", "type_z0"],
4459
4459
  "전방탐색 : .+(?=:) => :앞의 모든 문자": [4, ".+(?=:)", "type_z0"],
4460
- "후방탐색 : (?<=\$)[0-9.]+ => $뒤의 숫자": [4, "(?<=\$)[0-9.]+", "type_z0"],
4461
- "Html태그중 <H숫자>찾을문자<\H숫자>안의 글자": [4, "<H(0-30])>.*?</H\\1>", "type_z0"],
4460
+ r"후방탐색 : (?<=\$)[0-9.]+ => $뒤의 숫자": [4, r"(?<=\$)[0-9.]+", "type_z0"],
4461
+ r"Html태그중 <H숫자>찾을문자<\H숫자>안의 글자": [4, r"<H(0-30])>.*?</H\\1>", "type_z0"],
4462
4462
  "문장중 핸드폰번호 찾기": [4, "0[1~1][숫자:2~2]-[0~1][숫자:3~4]-[0~1][숫자:4~4]", "type_z0"],
4463
4463
  "2022-01-01형식의 날짜찾기": [4, "[0-9]{4})-([0-9]{2})-([0-9]{2}", "type_z0"],
4464
- "이메일찾기": [4, "[\w\.-]+@[\w\.-]+", "type_z0"],
4464
+ "이메일찾기": [4, r"[\w\.-]+@[\w\.-]+", "type_z0"],
4465
4465
  "괄호안의 숫자 찾기": [4, "([모든문자:0~])", "type_z0"],
4466
- "지역 전화번호 찾기": [4, "0(2|31|32|33|41|42|43|44|51|52|53|54|55|61|62|63|64)\-{0,1}\d{3,4}\-{0,1}\d{4}", "type_z0"],
4466
+ "지역 전화번호 찾기": [4, r"0(2|31|32|33|41|42|43|44|51|52|53|54|55|61|62|63|64)\-{0,1}\d{3,4}\-{0,1}\d{4}", "type_z0"],
4467
4467
  "주민등록번호": [4, "[0-9]{2}0[1-9]|1[0-2]0[1-9]|[1,2][0-9]|3[0,1]-[1-4][0-9]{6}", "type_z0"],
4468
4468
  "금액": [4, "[숫자,][1~][원:0~1]", "type_z0"],
4469
4469
  "중복된 단어 찾기": [4, "\\b(\\w+)\\s+\\1\\b", "type_z0"],
@@ -4602,3 +4602,38 @@ excelx.paint_min_value_in_range_in_each_xline("", xyxy)
4602
4602
  ["먼 훗날", "그때에", "잊었노라"], ]
4603
4603
 
4604
4604
 
4605
+ self.varx["data"]["l2d_연습용_같은자료포함_01"] = [
4606
+ ['강원도', '강릉시', '밑에가 빈자료', '주문진읍', '삼교리', 1234, 128.73366, "2025-12-31"],
4607
+ ['강원도', '강릉시', '밑에가 빈자료', '주문진읍', '장덕리', 1234, 128.784153, "2025-12-31"],
4608
+ ['강원도', '강릉시', '밑에가 빈자료', '주문진읍', '주문리', 1234, 128.82772, "2025-12-31"],
4609
+ ['강원도', '강릉시', '', '주문진읍', '향호리', 1234, 128.80247, "2025-12-31"],
4610
+ ['강원도', '강릉시', '', '주문진읍', '', 1234, 128.762214, "2025-12-31"],
4611
+ ['강원도', '강릉시', '', '강동면', '모전리', ' 왼쪽이 공백', 128.964641, "2025-12-31"],
4612
+ ['강원도', '강릉시', '', '강동면', '산성우리', ' 왼쪽이 공백', 129.014238, "2026-06-06"],
4613
+ ['강원도', '강릉시1', '', '강동면', '상시동리', ' 왼쪽이 공백', 128.964641, "2026-06-06"],
4614
+ ['강원도', '강릉시2', '', '강동면', '심곡리', ' 왼쪽이 공백', 129.964641, "2026-06-06"],
4615
+ ['강원도', '강릉시3', '', '구정면', '어단리', 37.695746, 128.904671, "2026-06-06"],
4616
+ ['강원도', '강릉시4', '', '구정면', '여찬리', 37.721853, 128.877571, "2026-06-06"],
4617
+ ['강원도', '강릉시5', '여기도 빈자료', '구정면', '제비리', 37.721402, 128.964641, "2026-06-06"],
4618
+ ['강원도', '강릉시6', '', '구정면', '학산리', ' 1234가나다abc ', 128.964641, "2026-06-06"],
4619
+ ['강원도', '강릉시7', '', '구정면', '', ' 1234가나다abc ', 128.964641, "2027-10-10"],
4620
+ ['강원도', '강릉시8', '특수문자포함(#$%)', '사천면', '노동리', ' 1234가나다abc ', 128.964641, "2027-10-10"],
4621
+ ['강원도', '강릉시', '특수문자포함(#$%)', '사천면', '덕실리', 37.812046, 128.842263, "2027-10-10"],
4622
+ ['강원도', '강릉시', '특수문자포함(#$%)', '사천면', '미노리', ' 1234가나다abc ', 128.857105, "2027-10-10"],
4623
+ ['강원도', '강릉시', '특수문자포함(#$%)', '사천면', '방동리', ' 1234 가나다 abc ', 128.863786, "2027-10-10"],
4624
+ ['강원도', '강릉시', '특수문자포함(#$%)', '사천면', '사기막리', 37.791322, 128.811454, "2027-10-10"],
4625
+ ['강원도', '강릉시', '', '사천면', '사천진리', ' 1234 가나다 abc ', 128.873287, "2027-10-10"],
4626
+ ['경기도', '안양시', '만안구', '박달1동', '', ' 1234 가나다 abc ', 126.909114, "2020-02-02"],
4627
+ ['경기도', '안양시', '만안구', '박달2동', '', ' 1234 가나다 abc ', 126.901687, "2020-02-02"],
4628
+ ['경기도', '안양시', '동안구', '비산동', '', ' 1234 가나다 abc ', 126.946599, "2020-02-02"],
4629
+ ['경기도', '안양시', '동안구', '신촌동', '', ' 1234 (가나다) abc ', 126.956423, "2020-02-02"],
4630
+ ['경기도', '안양시', '동안구', '평안동', '', ' 1234 (가나다) abc ', 126.964245, "2020-02-02"],
4631
+ ['경기도', '안양시', '동안구', '평촌동', '', ' 1234 (가나다) abc ', 126.967983, "2020-02-02"],
4632
+ ['서울특별시', '', '성동구', '상왕십리동', '', ' 1234 (가나다) abc ', 127.025349, "1968-06-28"],
4633
+ ['서울특별시', '', '성동구', '성수2가제1동', '', ' 1234 (가나다) abc ', 127.056517, "1968-06-28"],
4634
+ ['서울특별시', '', '성동구', '성수2가제3동', '', '오른쪽이 공백 ', 127.056517, "1968-06-28"],
4635
+ ['서울특별시', '', '성동구', '송정동', '', '오른쪽이 공백 ', 127.062066, "1968-06-28"],
4636
+ ['서울특별시', '', '노원구', '상계9동', '', '오른쪽이 공백 ', 127.063818, "1968-06-28"],
4637
+ ['서울특별시', '', '노원구', '상계동', '', '오른쪽이 공백 ', 127.072189, "1968-06-28"],
4638
+ ]
4639
+
@@ -19,8 +19,8 @@ class xy_db:
19
19
  pass
20
20
  def __init__(self, db_name=""):
21
21
  self.db_name = db_name
22
- self.utilx = xy_util.xy_util()
23
- self.excelx = xy_excel.xy_excel()
22
+ self.util = xy_util.xy_util()
23
+ self.excel = xy_excel.xy_excel()
24
24
 
25
25
  self.table_name = ""
26
26
  self.con = "" # sqlite db에 연결되는 것
@@ -307,8 +307,8 @@ class xy_db:
307
307
  :return:
308
308
  """
309
309
 
310
- input_list_2d = self.utilx.check_data_types_for_list_2d(input_list_2d) # 2차원이 아닐때 2차원으로 만들러 주는것
311
- listdb = self.utilx.change_xylist_to_yxlist(input_list_2d)
310
+ input_list_2d = self.util.check_data_types_for_list_2d(input_list_2d) # 2차원이 아닐때 2차원으로 만들러 주는것
311
+ listdb = self.util.change_xylist_to_yxlist(input_list_2d)
312
312
  return listdb
313
313
 
314
314
  def change_list_2d_to_listdb_1(self, input_list_2d, first_is_title=True):
@@ -322,10 +322,10 @@ class xy_db:
322
322
 
323
323
  if first_is_title:
324
324
  title_list = input_list_2d[0]
325
- db_list_2d = self.utilx.change_xylist_to_yxlist(input_list_2d[1:])
325
+ db_list_2d = self.util.change_xylist_to_yxlist(input_list_2d[1:])
326
326
  else:
327
327
  title_list = []
328
- db_list_2d = self.utilx.change_xylist_to_yxlist(input_list_2d)
328
+ db_list_2d = self.util.change_xylist_to_yxlist(input_list_2d)
329
329
  return [title_list, db_list_2d]
330
330
 
331
331
  def change_list_db_to_df(self, input_list_db):
@@ -404,8 +404,8 @@ class xy_db:
404
404
  temp = []
405
405
  result = {}
406
406
  if type(listdb) == type([]):
407
- listdb = self.utilx.check_data_types_for_list_2d(listdb) # 2차원이 아닐때 2차원으로 만들러 주는것
408
- listdb = self.utilx.change_list_2d_to_list_2d_as_same_len(listdb) # 길이가 다를때 제일 긴것으로 똑같이 만들어 주는것
407
+ listdb = self.util.check_data_types_for_list_2d(listdb) # 2차원이 아닐때 2차원으로 만들러 주는것
408
+ listdb = self.util.change_list_2d_to_list_2d_as_same_len(listdb) # 길이가 다를때 제일 긴것으로 똑같이 만들어 주는것
409
409
  # 별도로 column의 제목이 없다면, 1번부터 시작하는 번호를 넣어준다
410
410
  if col_list == "":
411
411
  for index, list_1d in enumerate(listdb):
@@ -744,7 +744,7 @@ class xy_db:
744
744
  :param path: 경로
745
745
  :return:
746
746
  """
747
- db_name_all = self.utilx.get_all_filename_in_folder(path)
747
+ db_name_all = self.util.get_all_filename_in_folder(path)
748
748
  if db_name in db_name_all:
749
749
  result = db_name
750
750
  else:
@@ -1390,19 +1390,19 @@ class xy_db:
1390
1390
  x_len = 10
1391
1391
  y_len = 12
1392
1392
 
1393
- self.excelx.new_sheet()
1393
+ self.excel.new_sheet()
1394
1394
  for index in range(1, y_len + 1):
1395
1395
  y_title_list.append("title_" + str(index))
1396
1396
 
1397
- self.excelx.write_list_1d_from_cell("", [1, 2], y_title_list)
1397
+ self.excel.write_list_1d_from_cell("", [1, 2], y_title_list)
1398
1398
  for no1 in range(1, x_len + 1):
1399
1399
  for no2 in range(1, y_len + 1):
1400
- self.excelx.write_value_in_cell("", [no1 + 1, no2 + 1], no1 * 10 + no2)
1400
+ self.excel.write_value_in_cell("", [no1 + 1, no2 + 1], no1 * 10 + no2)
1401
1401
 
1402
1402
  x_title_list = []
1403
1403
  for index in range(1, x_len + 1):
1404
1404
  x_title_list.append("줄_" + str(index))
1405
- self.excelx.write_list_1d_from_cell_as_yline("", [2, 1], x_title_list)
1405
+ self.excel.write_list_1d_from_cell_as_yline("", [2, 1], x_title_list)
1406
1406
 
1407
1407
  def make_cursor_for_sqlite_db(self, db_name=""):
1408
1408
  """
@@ -1528,7 +1528,7 @@ class xy_db:
1528
1528
  """
1529
1529
  result = []
1530
1530
  line_len = len(input_l2d)
1531
- y_len = self.utilx.get_max_len_for_list_2d(input_l2d)
1531
+ y_len = self.util.get_max_len_for_list_2d(input_l2d)
1532
1532
  title_list = []
1533
1533
  type_list = []
1534
1534
  for no in range(1, y_len + 1):
@@ -1561,7 +1561,7 @@ class xy_db:
1561
1561
  :param col_list: y컬럼 이름들
1562
1562
  :return:
1563
1563
  """
1564
- sql_columns = self.utilx.change_list_1d_to_text_with_chain_word(col_list, ", ")
1564
+ sql_columns = self.util.change_list_1d_to_text_with_chain_word(col_list, ", ")
1565
1565
  sql_values = "?," * len(col_list)
1566
1566
  result = "insert into %s (%s) values (%s)" % (table_name, sql_columns, sql_values[:-1])
1567
1567
  return result
@@ -1700,7 +1700,7 @@ class xy_db:
1700
1700
  self.cursor.execute(f"CREATE TABLE {table_name} ({text1})")
1701
1701
 
1702
1702
  def make_table_with_title_list_in_sqlite_memory_db(self, table_name, column_data_list):
1703
- sql_columns = self.utilx.change_list_1d_to_text_with_chain_word(column_data_list, "VARIANT, ")
1703
+ sql_columns = self.util.change_list_1d_to_text_with_chain_word(column_data_list, "VARIANT, ")
1704
1704
  sql_columns = sql_columns + "VARIANT"
1705
1705
  sql_2 = f"CREATE TABLE {table_name}({sql_columns})"
1706
1706
  self.cursor.execute(sql_2)
@@ -2144,7 +2144,7 @@ class xy_db:
2144
2144
  if y_title_s == "":
2145
2145
  sql_columns = "*"
2146
2146
  else:
2147
- sql_columns = self.utilx.change_list_1d_to_text_with_chain_word(y_title_s, ", ")
2147
+ sql_columns = self.util.change_list_1d_to_text_with_chain_word(y_title_s, ", ")
2148
2148
  if condition == "all":
2149
2149
  lim_no = 100
2150
2150
  else:
@@ -2318,7 +2318,7 @@ class xy_db:
2318
2318
  def split_list_2d_as_data_x_title_y_title(self, input_list_2d, x_title_len, y_title_len):
2319
2319
  """
2320
2320
  2줄이상의 제목이 들어갈수있을것같아, 2차원의 자료로 만들었다
2321
- list_2d = self.utilx.check_list_2d(input_list_2d)
2321
+ list_2d = self.util.check_list_2d(input_list_2d)
2322
2322
 
2323
2323
  :param input_list_2d:
2324
2324
  :param x_title_len:
@@ -2382,8 +2382,8 @@ class xy_db:
2382
2382
  """
2383
2383
  col_list = input_df.columns.values.tolist()
2384
2384
  value_list = input_df.values.tolist()
2385
- self.excelx.write_list_1d_from_cell_as_yline("", xy, col_list)
2386
- self.excelx.write_value_in_range_as_speedy("", [xy[0] + 1, xy[1]], value_list)
2385
+ self.excel.write_list_1d_from_cell_as_yline("", xy, col_list)
2386
+ self.excel.write_value_in_range_as_speedy("", [xy[0] + 1, xy[1]], value_list)
2387
2387
 
2388
2388
  def write_df_to_sqlite(self, db_name, table_name, input_df):
2389
2389
  """