Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Commonmark migration
Source Link

Text files are normally not executable. What do you mean with "open" here?

  1. This could mean "open it so that I can use it in the program".

    This could mean "open it so that I can use it in the program".

    This works with file_object = open('/home/yash/Documents/ct.txt', 'r') and then using that file_object.

  2. This as well could mean "let the file type's associated application open the file so that the user can edit it".

    In this case, you would have to find out what the associated application is. How you do this is dependent on the OS you use as well as the window manager/desktop environment. It cannot be answered in a few short sentences.

This works with file_object = open('/home/yash/Documents/ct.txt', 'r') and then using that file_object.

  1. This as well could mean "let the file type's associated application open the file so that the user can edit it".

In this case, you would have to find out what the associated application is. How you do this is dependent on the OS you use as well as the window manager/desktop environment. It cannot be answered in a few short sentences.

Text files are normally not executable. What do you mean with "open" here?

  1. This could mean "open it so that I can use it in the program".

This works with file_object = open('/home/yash/Documents/ct.txt', 'r') and then using that file_object.

  1. This as well could mean "let the file type's associated application open the file so that the user can edit it".

In this case, you would have to find out what the associated application is. How you do this is dependent on the OS you use as well as the window manager/desktop environment. It cannot be answered in a few short sentences.

Text files are normally not executable. What do you mean with "open" here?

  1. This could mean "open it so that I can use it in the program".

    This works with file_object = open('/home/yash/Documents/ct.txt', 'r') and then using that file_object.

  2. This as well could mean "let the file type's associated application open the file so that the user can edit it".

    In this case, you would have to find out what the associated application is. How you do this is dependent on the OS you use as well as the window manager/desktop environment. It cannot be answered in a few short sentences.

Source Link
glglgl
  • 91.5k
  • 13
  • 157
  • 230

Text files are normally not executable. What do you mean with "open" here?

  1. This could mean "open it so that I can use it in the program".

This works with file_object = open('/home/yash/Documents/ct.txt', 'r') and then using that file_object.

  1. This as well could mean "let the file type's associated application open the file so that the user can edit it".

In this case, you would have to find out what the associated application is. How you do this is dependent on the OS you use as well as the window manager/desktop environment. It cannot be answered in a few short sentences.