浏览代码

core.py: added grass.separator() for G_OPT_F_SEP

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60622 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 11 年之前
父节点
当前提交
d328e09b7f
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      lib/python/script/core.py

+ 15 - 0
lib/python/script/core.py

@@ -674,6 +674,21 @@ def parser():
 
 
     return _parse_opts(lines[1:])
     return _parse_opts(lines[1:])
 
 
+
+def separator(sep):
+    if sep == "pipe":
+        return "|"
+    elif sep == "comma":
+        return ","
+    elif sep == "space":
+        return " "
+    elif sep == "tab":
+        return "\t"
+    elif sep == "newline":
+        return "\n"
+    return sep
+    
+
 # interface to g.tempfile
 # interface to g.tempfile