Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import iterm2
  2.  
  3. async def main(connection):
  4. app = await iterm2.async_get_app(connection)
  5. window = app.current_terminal_window
  6. tab = window.tabs[0]
  7. print(f'Before: {tab.sessions}')
  8. await tab.sessions[0].async_split_pane()
  9. print(f'After: {tab.sessions}')
  10.  
  11. iterm2.run_until_complete(main)
  12.  
  13. # Output is:
  14. Before: [<Session name=vim id=4058DAA1-B6C6-4376-B822-7A6E5EDADBB0>]
  15. After: [<Session name=vim id=4058DAA1-B6C6-4376-B822-7A6E5EDADBB0>, <Session name= id=A82F1674-C386-4CAA-868B-507C4474A1BB>]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement