
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to open new pseudo-terminal pair using Python?
You can use the os.openpty() to open a new pseudo-terminal pair using Python. This method gives a pair of file descriptors (master, slave), for the master and the slave end, respectively.
Example
You can use it in the following way:
import os # master for pty, slave for tty m,s = os.openpty() print m print s # showing terminal name s = os.ttyname(s) print m print s
Output
You will get the output:
3 4 3 /dev/pty0
- Related Questions & Answers
- How to open a new pseudo-terminal pair using Python?
- Pseudo-terminal Utilities in Python
- How to open a new tab using Selenium WebDriver?
- How to create a new directory in Linux using the terminal?
- How to open a new window on a browser using Selenium WebDriver for python?
- How to open a link in new tab using Selenium WebDriver?
- How to open a URL in a new tab (and not a new window) using JavaScript?
- How to open link in a new window - JavaScript?
- How to open a new tab using Selenium WebDriver and start the link?
- Formatted text in Linux Terminal using Python
- How to open a link in new tab of chrome browser using Selenium WebDriver?
- How to open new tab in same browser and switch between them using Selenium?
- Open New Tab in Visual CSharp
- Open New Browser Tab in Selenuim
- How to decorate your Linux Terminal using Shell?
Advertisements