Python
Line editor
This is a pretty primitive editor. Most commands act on one line at a time and you can't enter content until the empty blank line is first created. There are no command abbreviations so you must type the entire command word to process it. The editor is very simple: you can't even save your changes to disk However, you can process a series of commands from a batch file from disk. As part of this project, your instructor will provide a command file for you to test your software. If the program has any discrepancies, that should be detected in the output. Thus, for Canvas, please submit your Python source file and a snapshot of the output from this test script. You can share ideas, but this is an individual project, so please dont share your code or your work Line numbers Each line in the document has a line number . The first line number is 1; the next one is 2. Line numbers are incremented by 1 . Line numbers are not permanently attached to their line content. The line number for a . When you first start the program, there are no lines. The first insert command creates a sequentially to the end of the document line can move up or down as you dynamically insert or delete lines ahead of it empty/blank line at line 1. The first tyneover command against line 1 adds content to that top, first line The Editor commands There are 7 Commands. A sample line number may be shown insert5 . inserts an empty blank line at at line position 5: old #5 becomes new #6. old #6 becomes new #7, and so forth to the document end. If line #4 does not yet exist, the new line is created with the first available line number beyond the end-of-document. For instance. If the document is empty, the line is created at #1 regardless of the number requested in the command. You can not get an error with this command 1, delete5. deletes line 5; old line #6 is promoted to become new #5, old #7 becomes new #6, and so forth. If line 5 doesnt exist, the command ignored. No error messages are generated by this program. In general, any input errors are siently ignored 2. 3. typeover 5 line contentz-the contents of line 5 is replaced by the content in dine content. If line 5 doesn't exist, the command is ignored. An empty blank line first must be created first before content can be typed into that line position 4. printall - prints the contents of your document as a series of lines from the beginning to the end of the document. The output is thus a sequence of lines with each line exhibiting this format
: with enew text>. The delimiter is a single quote This is a pretty primitive editor. Most commands act on one line at a time and you can't enter content until the empty blank line is first created. There are no command abbreviations so you must type the entire command word to process it. The editor is very simple: you can't even save your changes to disk However, you can process a series of commands from a batch file from disk. As part of this project, your instructor will provide a command file for you to test your software. If the program has any discrepancies, that should be detected in the output. Thus, for Canvas, please submit your Python source file and a snapshot of the output from this test script. You can share ideas, but this is an individual project, so please dont share your code or your work Line numbers Each line in the document has a line number . The first line number is 1; the next one is 2. Line numbers are incremented by 1 . Line numbers are not permanently attached to their line content. The line number for a . When you first start the program, there are no lines. The first insert command creates a sequentially to the end of the document line can move up or down as you dynamically insert or delete lines ahead of it empty/blank line at line 1. The first tyneover command against line 1 adds content to that top, first line The Editor commands There are 7 Commands. A sample line number may be shown insert5 . inserts an empty blank line at at line position 5: old #5 becomes new #6. old #6 becomes new #7, and so forth to the document end. If line #4 does not yet exist, the new line is created with the first available line number beyond the end-of-document. For instance. If the document is empty, the line is created at #1 regardless of the number requested in the command. You can not get an error with this command 1, delete5. deletes line 5; old line #6 is promoted to become new #5, old #7 becomes new #6, and so forth. If line 5 doesnt exist, the command ignored. No error messages are generated by this program. In general, any input errors are siently ignored 2. 3. typeover 5 line contentz-the contents of line 5 is replaced by the content in dine content. If line 5 doesn't exist, the command is ignored. An empty blank line first must be created first before content can be typed into that line position 4. printall - prints the contents of your document as a series of lines from the beginning to the end of the document. The output is thus a sequence of lines with each line exhibiting this format : with enew text>. The delimiter is a single quote