Skip to content

Commit ca110b2

Browse files
author
Detlef Groth
committed
slightly extending main abbreviation for python.eaf
1 parent ac2c3b9 commit ca110b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jasspa/macros/python.eaf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"" "</FOLD><FOLD+> \ecCControl Flow:\ecA"
2-
main "#!/usr/bin/env python3\r# -*- coding: ISO-8859-15 -*-\r\"\"\"\pModule docstring\"\"\"\r__author__ = \"first last\"\r__version__ = \"0.1\"\rimport sys, os, re\r\rdef usage(argv):\r\Tprint(f\"Usage: {argv[0]} args\")\r\r\Tprint(__doc__)\r\rdef main(argv):\r\Tif (len(argv)) == 1:\r\Tusage(argv)\r\rif __name__ == \"__main__\":\r\Tmain(sys.argv)\r\r\P" " main"
2+
main "#!/usr/bin/env python3\r# -*- coding: ISO-8859-15 -*-\r\"\"\"\pModulename\r\rUsage: {0} ?-h,-?,--help?\r\rArguments:\r\"\"\"\r__author__ = \"first last\"\r__version__ = \"0.1\"\rimport sys, os, re\r\rdef help(argv):\r\Tprint(__doc__.format(argv[1]))\r\rdef usage(argv):\r\Tprint(f\"Usage: {argv[0]} args\")\r\rdef main(argv):\r\Tif (len(argv)) == 1:\r\Tusage(argv)\r\r\Telif \"-h\" in argv or \"--help\" in argv:\r\Thelp(argv)\r\rif __name__ == \"__main__\":\r\Tmain(sys.argv)\r\r\P" " main"
33
enc "# -*- coding: ISO-8859-\p -*-\r\P" " enc"
44
enc15 "# -*- coding: ISO-8859-15 -*-\r" " enc15"
55
enc1252 "# -*- coding: cp1252 -*-\r" " enc1252"
@@ -14,6 +14,7 @@ eli "elif \p:\P" " eli(f)"
1414
els "else:\r\T" " els(e)"
1515
whi "while (\p):\r\P" " whi(le)"
1616
for "for \p in range(10):\P" " for"
17+
l2d "dct=dict({})\rfor i in range(1,len(\plst),2):\r\Tkey = lst[i]\rval = lst[i+1]\rdct[key]=val\r\P" " l2d"
1718
iffile "if not os.path.isfile(\p):\P" " iffile"
1819
openr "file = open(\p,'r')\rfor line in file:\r print(line)\rfile.close()\r\P" " openr"
1920
openw "out = open(\p,'w')\rout.write('')\rout.close()\r\P" " openw"

0 commit comments

Comments
 (0)