io.open
open_file / new_document.
open.open_file
io.open.open_file(app, path, format=None)Open path in app and return the absolute path opened.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| app | hwpapi.App | Live App instance. | required |
| path | str | Path | File path (relative resolved against cwd). | required |
| format | str | HWP format string ("HWP", "PDF", "HWPX" β¦). None lets HWP auto-detect. |
None |
Raises
| Name | Type | Description |
|---|---|---|
| FileIOError | Wraps any COM error raised by :meth:App.open, with the path included in the message. |
open.new_document
io.open.new_document(is_visible=True)Create a fresh :class:~hwpapi.App backed by a blank document.
Thin helper around :meth:hwpapi.App.new β prefer this when reading linearly in io-heavy scripts so the hwpapi.io namespace exposes the full open/new/export lifecycle.
Raises
| Name | Type | Description |
|---|---|---|
| FileIOError | If the underlying :meth:App.new raises a COM error (rare β usually means HWP canβt be dispatched at all). |