File: unorderedList.py

package info (click to toggle)
pythoncard 0.8.2-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,452 kB
  • sloc: python: 56,787; makefile: 56; sh: 22
file content (7 lines) | stat: -rw-r--r-- 244 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
# inserts "\t* " before each line in the selection
text = bg.components.fldDocument.getStringSelection()
unorderedList = ""
for i in text.splitlines(1):
    unorderedList += "\t* " + i

bg.components.fldDocument.replaceSelection(unorderedList)