Advertisement
Guest User

Untitled

a guest
Apr 26th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. retest.py:
  2. ----------
  3. import re
  4.  
  5. m=re.search(r'name=(.+)', 'name=test')
  6.  
  7. if m and m.groups > 0:
  8. print m.group(1)
  9. ----------
  10. % ~/jython2.5.3b1/bin/jython retest2.py
  11. test
  12.  
  13. % ~/jython2.5.3b1/bin/jython -m py_compile retest2.py
  14.  
  15. java -cp ~/jython2.5.3b1/jython.jar:. retest2\$py
  16.  
  17. Exception in thread "main" Traceback (most recent call last):
  18. File "retest2$py", line 3, in <module>
  19. File "/home/joel/jython2.5.3b1/Lib/re.py", line 188, in compile
  20. return _compile(pattern, flags)
  21. File "/home/joel/jython2.5.3b1/Lib/re.py", line 239, in _compile
  22. p = sre_compile.compile(pattern, flags)
  23. File "/home/joel/jython2.5.3b1/Lib/re.py", line 239, in _compile
  24. p = sre_compile.compile(pattern, flags)
  25. File "/home/joel/jython2.5.3b1/Lib/sre_compile.py", line 512, in compile
  26. p = sre_parse.parse(p, flags)
  27. File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 679, in parse
  28. p = _parse_sub(source, pattern, 0)
  29. File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 314, in _parse_sub
  30. itemsappend(_parse(source, state))
  31. File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 534, in _parse
  32. if sourcematch("?"):
  33. File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 202, in match
  34. if char == self.next:
  35. java.lang.NullPointerException
  36. at org.python.core.PyObject._eq(PyObject.java:1440)
  37. at sre_parse$py.match$22(/home/joel/jython2.5.3b1/Lib/sre_parse.py:206)
  38. at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
  39. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  40. at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
  41. at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
  42. at org.python.core.PyFunction.__call__(PyFunction.java:327)
  43. at org.python.core.PyMethod.__call__(PyMethod.java:124)
  44. at sre_parse$py._parse$33(/home/joel/jython2.5.3b1/Lib/sre_parse.py:667)
  45. at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
  46. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  47. at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
  48. at org.python.core.PyFunction.__call__(PyFunction.java:327)
  49. at sre_parse$py._parse_sub$31(/home/joel/jython2.5.3b1/Lib/sre_parse.py:364)
  50. at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
  51. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  52. at org.python.core.PyBaseCode.call(PyBaseCode.java:166)
  53. at org.python.core.PyFunction.__call__(PyFunction.java:338)
  54. at sre_parse$py.parse$34(/home/joel/jython2.5.3b1/Lib/sre_parse.py:695)
  55. at sre_parse$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_parse.py)
  56. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  57. at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
  58. at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
  59. at org.python.core.PyFunction.__call__(PyFunction.java:327)
  60. at sre_compile$py.compile$13(/home/joel/jython2.5.3b1/Lib/sre_compile.py:532)
  61. at sre_compile$py.call_function(/home/joel/jython2.5.3b1/Lib/sre_compile.py)
  62. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  63. at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
  64. at org.python.core.PyFunction.__call__(PyFunction.java:327)
  65. at re$py._compile$12(/home/joel/jython2.5.3b1/Lib/re.py:245)
  66. at re$py.call_function(/home/joel/jython2.5.3b1/Lib/re.py)
  67. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  68. at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
  69. at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
  70. at org.python.core.PyFunction.__call__(PyFunction.java:327)
  71. at re$py.compile$8(/home/joel/jython2.5.3b1/Lib/re.py:188)
  72. at re$py.call_function(/home/joel/jython2.5.3b1/Lib/re.py)
  73. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  74. at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
  75. at org.python.core.PyBaseCode.call(PyBaseCode.java:127)
  76. at org.python.core.PyFunction.__call__(PyFunction.java:317)
  77. at retest2$py.f$0(/home/joel/software/actinica/nutfield/tests/retest2.py:8)
  78. at retest2$py.call_function(/home/joel/software/actinica/nutfield/tests/retest2.py)
  79. at org.python.core.PyTableCode.call(PyTableCode.java:165)
  80. at org.python.core.PyCode.call(PyCode.java:18)
  81. at org.python.core.imp.createFromCode(imp.java:386)
  82. at org.python.core.imp.createFromCode(imp.java:357)
  83. at org.python.core.Py.runMain(Py.java:964)
  84. at retest2$py.main(/home/joel/software/actinica/nutfield/tests/retest2.py)
  85.  
  86. java.lang.NullPointerException: java.lang.NullPointerException
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement