Stupid question: saving from notepad with extension not .txt

The save dialog box has a dropdown menu that allows you to save the file as .txt or * (all files), and selecting the * option should save the file as .py. It may be worth trying again, as it worked for Pat when they gave a new filename.
  • #1
nrqed
Science Advisor
Homework Helper
Gold Member
3,766
297
I think the heading pretty much says it all!
I want to write a python program and I am typing it in Notepad. when I save it, it adds .txt to my filename "myprogram.py".
How do I avoid that? (I know, it's a stupid question!)

Pat
 
Computer science news on Phys.org
  • #2
The save dialog box should have a dropdown menu which allows you to save the file as .txt or * (all files). If you pick the * option then you can have it save as .py.

I'm not totally sure, but it is worth a try.
 
  • #3
dduardo said:
The save dialog box should have a dropdown menu which allows you to save the file as .txt or * (all files). If you pick the * option then you can have it save as .py.

I'm not totally sure, but it is worth a try.

I could have sworn I *had* tried that and it did not work! But I tried it again (gicing a new filename) and it did work! Doh!

thanks! Your post at least prompted me to try again!

:-)


Pat
 

What does it mean to save from notepad with extension not .txt?

When you save a file from notepad, you are giving it a specific file extension that tells the computer what type of file it is. The .txt extension means that the file is a plain text document, which can be opened and edited with any basic text editor. Saving a file without the .txt extension means that the file will not be recognized as a plain text document.

What happens if I save a file from notepad without the .txt extension?

If you save a file from notepad without the .txt extension, the file will not be recognized as a plain text document. This means that it may not open properly in other text editors, and it may not be formatted correctly. It is important to always include the appropriate file extension when saving a file to ensure that it can be opened and read correctly.

Why does notepad automatically add the .txt extension when I save a file?

Notepad is a basic text editor, so it assumes that you are creating a plain text document. Therefore, it automatically adds the .txt extension to your file name when you save it. This is to ensure that the file is recognized as a plain text document and can be opened and edited by other text editors.

Can I change the file extension when saving from notepad?

Yes, you can change the file extension when saving from notepad. Simply type in the desired extension after the file name in the "Save As" dialog box. However, be aware that changing the file extension may cause the file to be unreadable by certain programs that are designed to open specific file types.

What file extensions are supported by notepad?

Notepad supports a variety of file extensions, including .txt, .bat, .cmd, .ini, and .log. These are all plain text file extensions and can be opened and edited in notepad. However, notepad does not support more complex file types such as .doc, .pdf, or .html. To open and edit these types of files, you will need a different program or software.

Similar threads

  • Programming and Computer Science
Replies
1
Views
540
  • Computing and Technology
Replies
13
Views
2K
  • Computing and Technology
Replies
5
Views
2K
  • Computing and Technology
Replies
20
Views
699
  • Programming and Computer Science
Replies
22
Views
921
  • Computing and Technology
Replies
30
Views
2K
  • Special and General Relativity
Replies
16
Views
2K
  • Computing and Technology
Replies
3
Views
1K
  • Programming and Computer Science
Replies
21
Views
533
  • Computing and Technology
Replies
16
Views
1K
Back
Top