Code: Select all
#!/usr/bin/env python3
import tkinter as tk
import iterm2
# To install, update, or remove packages from PyPI, use Scripts > Manage > Manage Dependencies...
async def main(connection):
# Your code goes here. Here's a bit of example code that adds a tab to the current window:
app = await iterm2.async_get_app(connection)
session = app.current_window.current_tab.current_session
if session is not None:
await session.async_send_text('date\n')
< /code>
Aber wie erfasst ich das Ergebnis dieses Befehls? Ich habe überprüft: < /p>
[list]
[*]ScreenStreamer
Code: Select all
async_get_contents
(siehe API DOC)
Aber für mich funktioniert nichts wirklich. Irgendwelche Gedanken?