pyfemtet 0.6.2__tar.gz → 0.6.4__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.

Potentially problematic release.


This version of pyfemtet might be problematic. Click here for more details.

Files changed (126) hide show
  1. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/PKG-INFO +1 -1
  2. pyfemtet-0.6.4/pyfemtet/__init__.py +1 -0
  3. pyfemtet-0.6.4/pyfemtet/_femtet_config_util/autosave.py +58 -0
  4. pyfemtet-0.6.4/pyfemtet/_femtet_config_util/exit.py +58 -0
  5. pyfemtet-0.6.4/pyfemtet/_message/1. make_pot.bat +11 -0
  6. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/_message/2. make_mo.bat +1 -1
  7. pyfemtet-0.6.4/pyfemtet/_message/babel.cfg +2 -0
  8. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/_message/locales/ja/LC_MESSAGES/messages.po +136 -124
  9. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/_message/locales/messages.pot +136 -124
  10. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/_message/messages.py +3 -0
  11. pyfemtet-0.6.4/pyfemtet/_warning.py +79 -0
  12. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/_femopt.py +58 -38
  13. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/_test_utils/record_history.py +50 -0
  14. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_base.py +10 -1
  15. pyfemtet-0.6.4/pyfemtet/opt/interface/_excel_interface.py +437 -0
  16. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_femtet.py +4 -75
  17. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_femtet_with_sldworks.py +1 -1
  18. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/_base.py +10 -8
  19. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_complex_components/main_figure_creator.py +82 -21
  20. pyfemtet-0.6.4/pyfemtet/opt/visualization/result_viewer/__init__.py +0 -0
  21. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyproject.toml +2 -1
  22. pyfemtet-0.6.2/pyfemtet/__init__.py +0 -1
  23. pyfemtet-0.6.2/pyfemtet/_message/1. make_pot.bat +0 -12
  24. pyfemtet-0.6.2/pyfemtet/_message/babel.cfg +0 -2
  25. pyfemtet-0.6.2/pyfemtet/_warning.py +0 -23
  26. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/LICENSE +0 -0
  27. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/README.md +0 -0
  28. {pyfemtet-0.6.2/pyfemtet/opt/_test_utils → pyfemtet-0.6.4/pyfemtet/_femtet_config_util}/__init__.py +0 -0
  29. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/_message/__init__.py +0 -0
  30. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/core.py +0 -0
  31. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/dispatch_extensions/__init__.py +0 -0
  32. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/dispatch_extensions/_impl.py +0 -0
  33. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/logger/__init__.py +0 -0
  34. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/logger/_impl.py +0 -0
  35. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/__init__.py +0 -0
  36. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/_femopt_core.py +0 -0
  37. {pyfemtet-0.6.2/pyfemtet/opt/optimizer/_optuna → pyfemtet-0.6.4/pyfemtet/opt/_test_utils}/__init__.py +0 -0
  38. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/_test_utils/control_femtet.py +0 -0
  39. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/_test_utils/hyper_sphere.py +0 -0
  40. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/__init__.py +0 -0
  41. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_femtet_parametric.py +0 -0
  42. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_femtet_with_nx/__init__.py +0 -0
  43. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_femtet_with_nx/_interface.py +0 -0
  44. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/interface/_femtet_with_nx/update_model.py +0 -0
  45. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/__init__.py +0 -0
  46. {pyfemtet-0.6.2/pyfemtet/opt/optimizer/_optuna/_botorch_patch → pyfemtet-0.6.4/pyfemtet/opt/optimizer/_optuna}/__init__.py +0 -0
  47. {pyfemtet-0.6.2/pyfemtet/opt/prediction → pyfemtet-0.6.4/pyfemtet/opt/optimizer/_optuna/_botorch_patch}/__init__.py +0 -0
  48. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/_optuna/_botorch_patch/enable_nonlinear_constraint.py +0 -0
  49. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/_optuna/_optuna.py +0 -0
  50. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/_optuna/_pof_botorch.py +0 -0
  51. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/_scipy.py +0 -0
  52. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/_scipy_scalar.py +0 -0
  53. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/optimizer/parameter.py +0 -0
  54. {pyfemtet-0.6.2/pyfemtet/opt/visualization → pyfemtet-0.6.4/pyfemtet/opt/prediction}/__init__.py +0 -0
  55. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/prediction/_base.py +0 -0
  56. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/prediction/single_task_gp.py +0 -0
  57. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/ParametricIF.femprj +0 -0
  58. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/ParametricIF.py +0 -0
  59. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/ParametricIF_test_result.reccsv +0 -0
  60. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX.femprj +0 -0
  61. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX.prt +0 -0
  62. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX.py +0 -0
  63. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX_test_result.reccsv +0 -0
  64. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW.SLDPRT +0 -0
  65. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW.femprj +0 -0
  66. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW.py +0 -0
  67. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW_test_result.reccsv +0 -0
  68. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/constrained_pipe.femprj +0 -0
  69. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/constrained_pipe.py +0 -0
  70. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/constrained_pipe_test_result.reccsv +0 -0
  71. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/gal_ex58_parametric.femprj +0 -0
  72. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/gal_ex58_parametric.py +0 -0
  73. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/gal_ex58_parametric_test_result.reccsv +0 -0
  74. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/gau_ex08_parametric.femprj +0 -0
  75. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/gau_ex08_parametric.py +0 -0
  76. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/gau_ex08_parametric_test_result.reccsv +0 -0
  77. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/her_ex40_parametric.femprj +0 -0
  78. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/her_ex40_parametric.py +0 -0
  79. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/her_ex40_parametric_test_result.reccsv +0 -0
  80. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric.femprj +0 -0
  81. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric.py +0 -0
  82. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric_parallel.py +0 -0
  83. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric_test_result.reccsv +0 -0
  84. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric.femprj +0 -0
  85. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric.py +0 -0
  86. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric_parallel.py +0 -0
  87. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric_test_result.reccsv +0 -0
  88. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/ParametricIF_jp.femprj +0 -0
  89. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/ParametricIF_jp.py +0 -0
  90. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_NX_jp.femprj +0 -0
  91. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_NX_jp.py +0 -0
  92. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_SW_jp.femprj +0 -0
  93. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_SW_jp.py +0 -0
  94. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/constrained_pipe_jp.py +0 -0
  95. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/gal_ex58_parametric_jp.femprj +0 -0
  96. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/gal_ex58_parametric_jp.py +0 -0
  97. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/gau_ex08_parametric_jp.femprj +0 -0
  98. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/gau_ex08_parametric_jp.py +0 -0
  99. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/her_ex40_parametric_jp.femprj +0 -0
  100. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/her_ex40_parametric_jp.py +0 -0
  101. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/paswat_ex1_parametric_jp.femprj +0 -0
  102. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/paswat_ex1_parametric_jp.py +0 -0
  103. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/paswat_ex1_parametric_parallel_jp.py +0 -0
  104. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/wat_ex14_parametric_jp.femprj +0 -0
  105. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/wat_ex14_parametric_jp.py +0 -0
  106. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/samples/femprj_sample_jp/wat_ex14_parametric_parallel_jp.py +0 -0
  107. {pyfemtet-0.6.2/pyfemtet/opt/visualization/_complex_components → pyfemtet-0.6.4/pyfemtet/opt/visualization}/__init__.py +0 -0
  108. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_base.py +0 -0
  109. {pyfemtet-0.6.2/pyfemtet/opt/visualization/_process_monitor → pyfemtet-0.6.4/pyfemtet/opt/visualization/_complex_components}/__init__.py +0 -0
  110. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_complex_components/alert_region.py +0 -0
  111. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_complex_components/control_femtet.py +0 -0
  112. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_complex_components/main_graph.py +0 -0
  113. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_complex_components/pm_graph.py +0 -0
  114. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_complex_components/pm_graph_creator.py +0 -0
  115. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_create_wrapped_components.py +0 -0
  116. {pyfemtet-0.6.2/pyfemtet/opt/visualization/_wrapped_components → pyfemtet-0.6.4/pyfemtet/opt/visualization/_process_monitor}/__init__.py +0 -0
  117. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_process_monitor/application.py +0 -0
  118. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_process_monitor/pages.py +0 -0
  119. {pyfemtet-0.6.2/pyfemtet/opt/visualization/result_viewer → pyfemtet-0.6.4/pyfemtet/opt/visualization/_wrapped_components}/__init__.py +0 -0
  120. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_wrapped_components/dbc.py +0 -0
  121. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_wrapped_components/dcc.py +0 -0
  122. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_wrapped_components/html.py +0 -0
  123. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/_wrapped_components/str_enum.py +0 -0
  124. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/result_viewer/.gitignore +0 -0
  125. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/result_viewer/application.py +0 -0
  126. {pyfemtet-0.6.2 → pyfemtet-0.6.4}/pyfemtet/opt/visualization/result_viewer/pages.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyfemtet
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Summary: Design parameter optimization using Femtet.
5
5
  Home-page: https://github.com/pyfemtet/pyfemtet
6
6
  License: BSD-3-Clause
@@ -0,0 +1 @@
1
+ __version__ = "0.6.4"
@@ -0,0 +1,58 @@
1
+ import winreg
2
+ from typing import Final
3
+
4
+ # レジストリのパスと値の名前
5
+ _REGISTRY_PATH: Final[str] = r"SOFTWARE\Murata Software\Femtet2014\Femtet"
6
+ _VALUE_NAME: Final[str] = "AutoSave"
7
+ _DEFAULT_VALUE: Final[bool] = True
8
+
9
+
10
+ def _get_autosave_enabled() -> bool:
11
+ try:
12
+ with winreg.OpenKey(winreg.HKEY_CURRENT_USER, _REGISTRY_PATH) as key:
13
+ value, regtype = winreg.QueryValueEx(key, _VALUE_NAME)
14
+ if regtype == winreg.REG_DWORD:
15
+ return bool(value)
16
+ else:
17
+ raise ValueError("Unexpected registry value type.")
18
+
19
+ except FileNotFoundError: # [WinError 2] 指定されたファイルが見つかりません。
20
+ __create_registry_key()
21
+ return _get_autosave_enabled()
22
+
23
+
24
+ def _set_autosave_enabled(enable: bool) -> None:
25
+ try:
26
+ with winreg.OpenKey(winreg.HKEY_CURRENT_USER, _REGISTRY_PATH, 0, winreg.KEY_SET_VALUE) as key:
27
+ winreg.SetValueEx(key, _VALUE_NAME, 0, winreg.REG_DWORD, int(enable))
28
+
29
+ except FileNotFoundError: # [WinError 2] 指定されたファイルが見つかりません。
30
+ __create_registry_key()
31
+ _set_autosave_enabled(enable)
32
+
33
+
34
+ def __test_autosave_setting():
35
+
36
+ # 使用例
37
+ current_setting = _get_autosave_enabled()
38
+ print(f"Current AutoSave setting is {'enabled' if current_setting else 'disabled'}.")
39
+
40
+ # 設定を変更する例
41
+ new_setting = not current_setting
42
+ _set_autosave_enabled(new_setting)
43
+ print(f"AutoSave setting has been {'enabled' if new_setting else 'disabled'}.")
44
+
45
+ # 再度設定を確認する
46
+ after_setting = _get_autosave_enabled()
47
+ print(f"Current AutoSave setting is {'enabled' if after_setting else 'disabled'}.")
48
+
49
+ assert new_setting == after_setting, "レジストリ編集に失敗しました。"
50
+
51
+
52
+ def __create_registry_key():
53
+ with winreg.CreateKey(winreg.HKEY_CURRENT_USER, _REGISTRY_PATH) as key:
54
+ winreg.SetValueEx(key, _VALUE_NAME, 0, winreg.REG_DWORD, int(_DEFAULT_VALUE))
55
+
56
+
57
+ if __name__ == '__main__':
58
+ print(_get_autosave_enabled())
@@ -0,0 +1,58 @@
1
+ from time import time, sleep
2
+ import logging
3
+
4
+ from win32com.client import CDispatch
5
+ from femtetutils import util
6
+ import psutil
7
+
8
+ from pyfemtet.dispatch_extensions._impl import _get_pid
9
+ from pyfemtet.core import _version
10
+ from pyfemtet._message import Msg
11
+
12
+ logger = logging.getLogger('fem')
13
+
14
+
15
+ def _exit_or_force_terminate(timeout, Femtet: CDispatch, force=True):
16
+
17
+ # Femtet がすでに終了しているかどうかを判断する
18
+ hwnd = Femtet.hWnd
19
+ pid = _get_pid(hwnd)
20
+
21
+ # pid が 0 ならすでに終了しているものと見做して何もしない
22
+ if pid == 0:
23
+ return
24
+
25
+ # Exit() メソッドを定義している最小の Femtet バージョン
26
+ minimum_version = _version(2024, 0, 1)
27
+
28
+ # 現在の Femtet のバージョン
29
+ current_version = _version(Femtet=Femtet)
30
+
31
+ # 現在のバージョン >= minimum version なら Exit を実行
32
+ if current_version >= minimum_version:
33
+ # gracefully termination method without save project available from 2024.0.1
34
+ try:
35
+ Femtet.Exit(force)
36
+
37
+ except AttributeError as e:
38
+ raise AttributeError('Macro version is not consistent to the one of Femtet.exe. '
39
+ 'Please consider ``Enable Macros`` to fix it.')
40
+
41
+ # そうでなければ強制終了する
42
+ else:
43
+ # terminate
44
+ util.close_femtet(Femtet.hWnd, timeout, force)
45
+
46
+ try:
47
+ pid = _get_pid(hwnd)
48
+ start = time()
49
+ while psutil.pid_exists(pid):
50
+ if time() - start > 30: # 30 秒経っても存在するのは何かおかしい
51
+ logger.error(Msg.ERR_CLOSE_FEMTET_FAILED)
52
+ break
53
+ sleep(1)
54
+ sleep(1)
55
+
56
+ # dead
57
+ except (AttributeError, OSError):
58
+ pass
@@ -0,0 +1,11 @@
1
+ @echo off
2
+ rem Run once per update source.
3
+ rem .pot file defines the target of string to translate.
4
+ rem .po file is the implementation of translation.
5
+
6
+ cd %~dp0\..\..
7
+ poetry run pybabel extract -F ./pyfemtet/_message/babel.cfg --no-wrap --ignore-dirs=".*" -o ./pyfemtet/_message/locales/messages.pot .
8
+ poetry run pybabel update -i ./pyfemtet/_message/locales/messages.pot --no-wrap -d ./pyfemtet/_message/locales -l ja
9
+
10
+ echo "�������ꂽ .po �t�@�C����|�󂵂Ă��������B"
11
+ pause
@@ -2,5 +2,5 @@ rem Run after edit po.
2
2
  rem .mo file created. This is compiled translation.
3
3
 
4
4
  cd %~dp0\..\..
5
- poetry run pybabel compile -d ./pyfemtet/message/locales
5
+ poetry run pybabel compile -d ./pyfemtet/_message/locales
6
6
  pause
@@ -0,0 +1,2 @@
1
+ [python: ./pyfemtet/_message/messages.py]
2
+ # [html: **/templates/**.html]