<｜begin▁of▁sentence｜>### Instruction:
Given an existing instance of an Editor window from IDLE, can you initialize an interactive IDLEShell within a Python application?
### Response:
from idlelib.idle_test.mock_idle import Editor
from idlelib.PyShell import PyShell

# Mocking an editor window
editor_window = Editor()

# Initialize IDLE shell with the mocked editor window
idle_shell = PyShell(editor_window)
<|EOT|>
