Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- retest.py:
- ----------
- import re
- m=re.search(r'name=(.+)', 'name=test')
- if m and m.groups > 0:
- print m.group(1)
- ----------
- % ~/jython2.5.3b1/bin/jython retest2.py
- test
- % ~/jython2.5.3b1/bin/jython -m py_compile retest2.py
- java -cp ~/jython2.5.3b1/jython.jar:. retest2\$py
- Exception in thread "main" Traceback (most recent call last):
- File "retest2$py", line 3, in <module>
- File "/home/joel/jython2.5.3b1/Lib/re.py", line 188, in compile
- return _compile(pattern, flags)
- File "/home/joel/jython2.5.3b1/Lib/re.py", line 239, in _compile
- p = sre_compile.compile(pattern, flags)
- File "/home/joel/jython2.5.3b1/Lib/re.py", line 239, in _compile
- p = sre_compile.compile(pattern, flags)
- File "/home/joel/jython2.5.3b1/Lib/sre_compile.py", line 512, in compile
- p = sre_parse.parse(p, flags)
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 679, in parse
- p = _parse_sub(source, pattern, 0)
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 314, in _parse_sub
- itemsappend(_parse(source, state))
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 534, in _parse
- if sourcematch("?"):
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 202, in match
- if char == self.next:
- java.lang.NullPointerException
- at org.python.core.PyObject._eq(PyObject.java:1440)
- at sre_parse$py.match$22(/home/joel/jython2.5.3b1/Lib/sre_parse.py:206)
- at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
- at org.python.core.PyFunction.__call__(PyFunction.java:327)
- at org.python.core.PyMethod.__call__(PyMethod.java:124)
- at sre_parse$py._parse$33(/home/joel/jython2.5.3b1/Lib/sre_parse.py:667)
- at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
- at org.python.core.PyFunction.__call__(PyFunction.java:327)
- at sre_parse$py._parse_sub$31(/home/joel/jython2.5.3b1/Lib/sre_parse.py:364)
- at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:166)
- at org.python.core.PyFunction.__call__(PyFunction.java:338)
- at sre_parse$py.parse$34(/home/joel/jython2.5.3b1/Lib/sre_parse.py:695)
- at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
- at org.python.core.PyFunction.__call__(PyFunction.java:327)
- at sre_compile$py.compile$13(/home/joel/jython2.5.3b1/Lib/sre_compile.py:532)
- at sre_compile$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_compile.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
- at org.python.core.PyFunction.__call__(PyFunction.java:327)
- at re$py._compile$12(/home/joel/jython2.5.3b1/Lib/re.py:245)
- at re$py.call_function(/home/joel/jython2.5.3b1/Lib/re.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
- at org.python.core.PyFunction.__call__(PyFunction.java:327)
- at re$py.compile$8(/home/joel/jython2.5.3b1/Lib/re.py:188)
- at re$py.call_function(/home/joel/jython2.5.3b1/Lib/re.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
- at org.python.core.PyBaseCode.call(PyBaseCode.java:127)
- at org.python.core.PyFunction.__call__(PyFunction.java:317)
- at retest2$py.f$0(/home/joel/software/actinica/nutfield/tests/retest2.py:8)
- at retest2$py.call_function(/home/joel/software/actinica/nutfield/tests/retest2.py)
- at org.python.core.PyTableCode.call(PyTableCode.java:165)
- at org.python.core.PyCode.call(PyCode.java:18)
- at org.python.core.imp.createFromCode(imp.java:386)
- at org.python.core.imp.createFromCode(imp.java:357)
- at org.python.core.Py.runMain(Py.java:964)
- at retest2$py.main(/home/joel/software/actinica/nutfield/tests/retest2.py)
- java.lang.NullPointerException: java.lang.NullPointerException
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement