Python - os.ctermid example
Get Filename corresponding to the controlling terminal of the process
import os # 👉️ Import module
my_file = os.ctermid() # 👉️ Get the Filename
print(my_file)
Output:
# How to Convert HTML to Markdown
/dev/tty
import os # 👉️ Import module
my_file = os.ctermid() # 👉️ Get the Filename
print(my_file)
Output:
# How to Convert HTML to Markdown
/dev/tty