Christian Junker wrote:
> Hi all,
>
> I have attached a new module officehelper.py with an improved
> implementation of the bootstrap mechanism to
> http://www.openoffice.org/issues/show_bug.cgi?id=54532 . I hope to get
> feedback from you guys, especially it would be nice to have some more
> helper functions integrated besides the new bootstrap mechanism, feel
> free to contribute.
> Just be aware that this module should be stuffed with helper functions
> explicitly for OOo, not the URE which itself is application
> independent.
>
> --
> Best Regards
> Christian Junker
Hi Christian and everyone else,
I like what you have done. I have a question about how you generate the
name for the pipe.
The expression I used duplicated the pipe names used by the Java
implementation:
sPipeName = "uno" + str(int(random.random() * 0x7fffffffffffffffL))
An example would be: sPipeName = uno5872094642496022528
Since random.random() returns a float the pipe name will always begin
with "uno0." and then random digits:
sPipeName = "uno" + str(random.random())
Example: sPipeName = uno0.82452818937
Will the period in the middle of the pipe name cause any problems,
especially on Windows? Other than being a shorter expression is there
any other advantages to your expression?
I don't know about the URE. have to admit that I haven't tried it yet. I
use the SDK so when I first tried officehelper.py I got this exception:
Traceback (most recent call last):
File "HelloTextTableShape.py", line 669, in getRemoteServiceManager
self.xRemoteContext = officehelper.bootstrap()
File "/home/kim/Projects/NewSurveys/Bootstrap/officehelper.py", line
72, in bootstrap
raise BootstrapException("Could not start %s." % (sOffice,), None)
BootstrapException: Could not start
/home/kim/Projects/NewSurveys/Bootstrap/soffice.
because I didn't have officehelper.py in the OOo "program" directory.
What I have tried is using this expression to create the path name to
soffice:
sOffice = os.path.join(os.environ['OFFICE_PROGRAM_PATH'], "soffice")
This is, of course, dependant upon having the OFFICE_PROGRAM_PATH
environment variable set up by the SDK.
Thank you all!
Kim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]