Timeline for Python script to delete sections of text
Current License: CC BY-SA 3.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 5, 2015 at 8:17 | answer | added | Spike | timeline score: 0 | |
Nov 5, 2015 at 7:55 | history | edited | Psycrow | CC BY-SA 3.0 |
Corrected minor code mistakes
|
Nov 4, 2015 at 19:54 | answer | added | 200_success | timeline score: 5 | |
Nov 4, 2015 at 17:32 | answer | added | SuperBiasedMan | timeline score: 5 | |
Nov 4, 2015 at 16:38 | history | edited | Quill | CC BY-SA 3.0 |
added 4 characters in body
|
Nov 4, 2015 at 16:31 | comment | added | jonrsharpe |
Trivially, you should factor out the hardcoded "fileName.xml" and adhere to the style guide (four space indents, snake_case variables, etc.)
|
|
Nov 4, 2015 at 16:21 | comment | added | Psycrow | I'm trying out Atom as a text editor and they looked to be on the same line when I copied them, I'm used to notepad++ tab lines. Apologies, corrected | |
Nov 4, 2015 at 16:19 | history | edited | Psycrow | CC BY-SA 3.0 |
deleted 12 characters in body
|
Nov 4, 2015 at 16:13 | history | edited | Psycrow | CC BY-SA 3.0 |
Changed file to output
|
Nov 4, 2015 at 16:10 | comment | added | Psycrow |
Sorry, overwrote output with file in my last edit, corrected. I don't know what you mean about the code not executing, that part of the code is copy pasted (just with comments removed) and it works as intended, I just want a more concise way of writing it
|
|
Nov 4, 2015 at 16:07 | history | edited | Psycrow | CC BY-SA 3.0 |
Changed file to output
|
Nov 4, 2015 at 16:02 | comment | added | Psycrow |
I've added further context, hopefully this is enough to explain how the current script works. I'm more or less happy with the rest, it's the clearFile function that I feel could be greatly improved
|
|
Nov 4, 2015 at 16:01 | history | edited | Psycrow | CC BY-SA 3.0 |
Updated context
|
Nov 4, 2015 at 15:41 | comment | added | 301_Moved_Permanently |
What I was asking was more how are they defined rather than what they are. Is your snipet of code the body of a function where path , beginDelete , stopDelete , and output are parameters? Or is it just a part of your module, verbatim, and these variables are defined earlier? In short, as @SuperBiasedMan said, give us context.
|
|
Nov 4, 2015 at 15:29 | comment | added | Psycrow |
I've changed file to outout , it's simply the file that the output is being written too. As stated in the explanation the beginDelete and stopDelete are the tags that surround the lines that should be deleted (this tag is a variable that is specified when the script starts).
|
|
Nov 4, 2015 at 15:26 | history | edited | Psycrow | CC BY-SA 3.0 |
added 2 characters in body
|
Nov 4, 2015 at 15:23 | comment | added | 301_Moved_Permanently |
This code is incomplete. What are beginDelete and stopDelete (assuming '<bad>' and '</bad>' from your input file, but who knows). I would also bet that file has nothing to do with the builtin, so what is it?
|
|
Nov 4, 2015 at 15:02 | history | edited | Psycrow | CC BY-SA 3.0 |
added 396 characters in body
|
Nov 4, 2015 at 14:54 | history | edited | SuperBiasedMan | CC BY-SA 3.0 |
edited tags; edited title
|
Nov 4, 2015 at 14:50 | review | First posts | |||
Nov 4, 2015 at 14:55 | |||||
Nov 4, 2015 at 14:46 | history | asked | Psycrow | CC BY-SA 3.0 |