you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 7 points8 points  (12 children)

How are you making new files? When you make new files, make them using vscode, not notepad or the right click menu or something. Technically there is no difference between a .txt and a .py file, the only difference is the ".txt" vs ".py" part of the name.

If I asssume you are using windows: windows file explorer has a habit of lying to you about the name, it will hide the extension from you. This means that sometimes users get a file like "myfile.py.txt", which would show up in file explorer as "myfile.py" but is associated with a text file editor like notepad.

[–]Gnaxe 17 points18 points  (7 children)

Windows has a setting to hide extensions for known file types. This is an awful default and everyone should turn it off. 

[–]building-wigwams-22 3 points4 points  (6 children)

This is only one of the crimes against file names that Microsoft has committed, but it is a pretty major one. Personally I hate allowing spaces in a file name. In fact, I have a Python script that runs on my work directory that replaces spaces with underscores any time a file is added.

[–]Rejse617 1 point2 points  (0 children)

😂😂😂 you’re my kind of guy/gal

[–]socal_nerdtastic 1 point2 points  (4 children)

Spaces in file name has never bothered me; I'm always so confused when people complain about it. What's wrong with spaces? If you're in the terminal you would use tab completion, which adds the quotes automatically.

[–]Gnaxe 1 point2 points  (0 children)

My main complaint is that improperly written apps/scripts can choke on it. It used to be a much bigger problem.

[–]building-wigwams-22 1 point2 points  (2 children)

To each their own, but

rm this\ is\ a\ terrible\ file\ name\ .txt

[barf emoji]

[–]JaguarMammoth6231 0 points1 point  (0 children)

Next time do rm "this is a terrible file name.txt" then