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

pyuno:: interactive python.bat -> cannot 'import re'

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


Joined: 19 Nov 2003
Posts: 2

PostPosted: Thu Nov 20, 2003 2:05 am    Post subject: pyuno:: interactive python.bat -> cannot 'import re' Reply with quote

Hi again,

windows2000, OOo1.1 installation with pyuno, no hacks to get my own python distribution

to get an interactive uno-able python shell, I'm starting the OpenOffice.org1.1.0\program\python.bat

the following happens:
[code]
Python 2.2.2 (#37, Aug 18 2003, 17:02:06) on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\arwa\progs\OpenOffice.org1.1.0\program\python-core-2.2.2\lib\re.py", line 27, in ?
from sre import *
File "C:\arwa\progs\OpenOffice.org1.1.0\program\python-core-2.2.2\lib\sre.py", line 97, in ?
import sre_compile
File "C:\arwa\progs\OpenOffice.org1.1.0\program\python-core-2.2.2\lib\sre_compile.py", line 13, in ?
import _sre, sys
ImportError: dynamic module does not define init function (init_sre)
>>>
[/code ]

Why?
Again the question (actually not just focussed on building pyuno-components _within_ OOo) --> what are the limitations of the actual python-support?

thanks
Peter
(=PA=)

P.S.: I don't know why the code tagging isn't working...
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sat Mar 19, 2005 10:11 am    Post subject: Reply with quote

Code:
import re

works fine in OOo 2.0 beta's private python.


Just adding cross reference...
See the links in the first article of this thread.
http://www.oooforum.org/forum/viewtopic.phtml?t=14409

see also....
http://www.oooforum.org/forum/viewtopic.phtml?p=71073#71073
_________________
Want to make OOo Drawings like the colored flower design to the left?
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: Mon Mar 21, 2005 10:08 am    Post subject: Reply with quote

Quote:

Why?
Again the question (actually not just focussed on building pyuno-components _within_ OOo) --> what are the limitations of the actual python-support?

Don't be surprised, there have been many problems with some modules and I think I remember having the same problems with re that you had.
To your second question:
There are many limitations, if you want to distribute your python scripts for others then you can only use the modules installed.
However it is a gray area, that I haven't delved into much, but I have heard from some guys that they made it work with third-party modules.
But you really have to be patient with OOo 1.1.x python core, and of course:
Tweaking/hacking is on your own risk Wink.

Christian
_________________
- 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