I am using Ubuntu 12.04 on a 64bit laptop. I am trying to open an application using python code.
import os
os.system("open /home/utsav/ab.txt")
It gives the following error:
"Couldn't get a file descriptor referring to the console 256"
What command do I want to use?
The command you're using - open is actually another command referred to in the man pages as openvt, which opens a virtual terminal.
I don't think that's what you want to do, so you would want to use another command (such as gnome-open, xdg-open, geany, gedit, vim, or nano).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With