Read a Lua script from a file.
(script_name: str)
| 19 | |
| 20 | |
| 21 | def read_lua_script(script_name: str) -> str: |
| 22 | """Read a Lua script from a file.""" |
| 23 | file_path = Path(__file__).parent / 'lua_scripts' / script_name |
| 24 | with file_path.open(mode='r', encoding='utf-8') as file: |
| 25 | return file.read() |