Your ROOT_URL in app.ini is https://git.hpc.odu.edu/ but you are visiting https://git.wahab.hpc.odu.edu/wirawan0/wpylib/commit/7ebb4004dc24fac862a90f7dc8e4b9d690e8ed68?style=unified&whitespace=show-all You should set ROOT_URL correctly, otherwise the web may not work correctly.

* str_igrep(): use enumerate function.

master
Wirawan Purwanto 14 years ago
parent d70bcf2149
commit 7ebb4004dc
  1. 3
      text_tools.py

@ -140,7 +140,8 @@ def str_grep(S, strs):
def str_igrep(S, strs):
"""Returns a list of the indices of the strings wherein the substring S
is found."""
return [i for (s,i) in zip(strs,xrange(len(strs))) if s.find(S) >= 0]
return [i for (i,s) in enumerate(strs) if s.find(S) >= 0]
#return [i for (s,i) in zip(strs,xrange(len(strs))) if s.find(S) >= 0]
def slice_str(s):

Loading…
Cancel
Save