Timeline for How to create a new text file using Python
Current License: CC BY-SA 4.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 3 at 0:33 | review | Close votes | |||
| Oct 7 at 0:02 | |||||
| Oct 3 at 0:17 | comment | added | Pat Myron | This question is similar to: open() in Python does not create a file if it doesn't exist | |
| Oct 3 at 0:16 | history | edited | Pat Myron | CC BY-SA 4.0 |
removing extraneous text
|
| Jun 29, 2024 at 20:36 | answer | added | Sergio Abreu | timeline score: 1 | |
| Jun 16, 2024 at 9:40 | review | Close votes | |||
| Jun 20, 2024 at 0:00 | |||||
| Jun 16, 2024 at 9:25 | history | edited | mkrieger1 | CC BY-SA 4.0 |
added 4 characters in body
|
| Aug 21, 2021 at 9:32 | history | protected | CommunityBot | ||
| Jan 14, 2019 at 20:14 | vote | accept | Just Half | ||
| Jan 12, 2019 at 15:08 | answer | added | r3t40 | timeline score: 19 | |
| Feb 24, 2018 at 17:01 | vote | accept | Just Half | ||
| Jan 14, 2019 at 20:14 | |||||
| Feb 24, 2018 at 16:37 | comment | added | Bentaye | His problem is not about the code he shows (where he gets the path of the file), the problem it is about opening the file, where he gets an error. | |
| Feb 24, 2018 at 16:28 | comment | added | Bill |
This code works on my computer if I substitute a filename for __file__. It produces a string. '/Users/myusername/copy.txt' in my case
|
|
| S Feb 24, 2018 at 16:00 | history | suggested | Bentaye | CC BY-SA 3.0 |
Better formatting of the error, to stand out of the text
|
| Feb 24, 2018 at 15:32 | review | Suggested edits | |||
| S Feb 24, 2018 at 16:00 | |||||
| Feb 24, 2018 at 15:25 | answer | added | Bentaye | timeline score: 212 | |
| Feb 24, 2018 at 9:25 | history | edited | yole | CC BY-SA 3.0 |
deleted 24 characters in body; edited tags; edited title
|
| Feb 24, 2018 at 9:24 | comment | added | yole | The IDE you're using is irrelevant here. It does not affect the behavior of Python code that you run from it. | |
| Feb 24, 2018 at 4:54 | comment | added | John Anderson | That code doesn't open a file, it just creates a path object. | |
| Feb 24, 2018 at 4:09 | comment | added | G_M | @JustHalf This code doesn't raise an error when I run it in PyCharm? | |
| Feb 24, 2018 at 3:52 | review | Close votes | |||
| Mar 11, 2018 at 3:03 | |||||
| Feb 24, 2018 at 3:51 | history | edited | Just Half | CC BY-SA 3.0 |
added 132 characters in body
|
| Feb 24, 2018 at 3:38 | comment | added | John Anderson | We cannot tell you what error you have in your code if you don't show us your code. | |
| Feb 24, 2018 at 3:33 | history | asked | Just Half | CC BY-SA 3.0 |