File: PrintEndOfLineCharactersInPrompt.py

package info (click to toggle)
drpython 1%3A3.11.4-1.1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 3,868 kB
  • ctags: 2,871
  • sloc: python: 16,653; makefile: 141; sh: 1
file content (17 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#drscript

#By Daniel Pozmanter
#Released under the GPL

drdoctext = DrDocument.GetText()
l = len(drdoctext)
x = 0
s = ""
while x < l:
    if drdoctext[x] == '\r':
        s = s + "<Carriage Return>\n"
    elif drdoctext[x] == '\n':
        s = s + "<Newline>\n"
    x = x + 1
DrFrame.ShowPrompt()
DrPrompt.SetText(s)