FAQ
I'm working with the postgressql embedded python - plpython - and the
re module is failing to import, complaining that it can't find the
_sre module. This is probably because the plpython embedding limits
what modules can be imported for security reasons.

Could someoen let me know when _sre was added to the list, and if
there's some way to avoid that dependency?

Thanks,
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

Search Discussions

  • Martin v. Löwis at Mar 27, 2003 at 9:53 am

    Could someoen let me know when _sre was added to the list, and if
    there's some way to avoid that dependency?
    Added to what list? And avoid what dependency?

    _sre is the regular expression engine of Python 2.x.

    Regards,
    Martin
  • Mike Meyer at Mar 27, 2003 at 3:15 pm

    "Martin v. L?wis" <martin.vonloewis at hpi.uni-potsdam.de> writes:

    Could someoen let me know when _sre was added to the list, and if
    there's some way to avoid that dependency?
    Added to what list? And avoid what dependency?
    Sorry - from the behavior of plpython, it appears that _sre was added
    to the list of python modules at some point in the past - and after
    sre itself was added.

    And the dependency of re on _sre. Right now, everything in plpython is
    working except importing re - which fails because it can't import
    _sre.

    <mike
    --
    Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
  • Martin v. Löwis at Mar 27, 2003 at 4:50 pm

    Sorry - from the behavior of plpython, it appears that _sre was added
    to the list of python modules at some point in the past - and after
    sre itself was added.
    That impression is incorrect: sre.py and the _sre module where added
    simultaneously.
    And the dependency of re on _sre. Right now, everything in plpython is
    working except importing re - which fails because it can't import
    _sre.
    Yes, re was changed to use sre in Python 2.0.

    Regards,
    Martin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 26, '03 at 3:41p
activeMar 27, '03 at 4:50p
posts4
users2
websitepython.org

2 users in discussion

Mike Meyer: 2 posts Martin v. Löwis: 2 posts

People

Translate

site design / logo © 2022 Grokbase