OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

No re module for OpenOffice Python core?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Wed Jun 09, 2004 1:33 pm    Post subject: No re module for OpenOffice Python core? Reply with quote

According to the DEFECT:
http://www.openoffice.org/issues/show_bug.cgi?id=21332

The sre.py and sre.pyc files are corrupted in the OOo Python core.
Although I replaced these files with the ones from my standard Python core (2.3.3) I still am not able to import the re module (regular expressions), which is useful for searching for patterns in strings.
I still get an ImportError (out of the Exception hirarchy) telling me that there is no module named re.

The odd thing is that I already saw code on some sites where people just imported the re module without having any traceback.
I really would like to get use of re but without any major modifications, like Danny has described (possibility of having another Python core in the OOo folder by means of a batch file).
Any suggestions?
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
Henrik
OOo Enthusiast
OOo Enthusiast


Joined: 15 Jan 2004
Posts: 118

PostPosted: Wed Jun 09, 2004 10:27 pm    Post subject: Reply with quote

Hi Cybb20,
have you tried to grab a copy of ActiveState's Python and use their
_sre.pyd file, as http://www.openoffice.org/issues/show_bug.cgi?id=21332 which you are refering to suggests?

I think mixing OOo's Python with Python 2.3 is a compiler issue if I remember correctly, and you will find a discussion on it here http://udk.openoffice.org/python/python-bridge.html.

ActiveState:
http://www.activestate.com/Products/ActivePython/

Dunno if it helps, hopefully it does...

Henrik
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Tue Jun 15, 2004 9:45 pm    Post subject: Reply with quote

now it works, thanks.
I wonder why it has to be the ActiveState distribution.
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
Henrik
OOo Enthusiast
OOo Enthusiast


Joined: 15 Jan 2004
Posts: 118

PostPosted: Tue Jun 15, 2004 11:51 pm    Post subject: Reply with quote

Hi,

Quote:
Cybb20 wrote:
I wonder why it has to be the ActiveState distribution


I can only speculate, but probably because it is compiled with the same compiler as OOo... Anyway, nice to know that it works Smile

Henrik[/b]
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Wed Jun 16, 2004 7:31 am    Post subject: Reply with quote

Tkinter doesn't work, as well.
I wonder why these exceptions happen with these fundamental modules, I can't really imagine how this could not be seen when distributed, or did the developers simply ignore these errors?
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group