[Tutor] Practical Question

kbond kbond at free.fr
Fri Apr 2 14:33:22 EST 2004


Hello,

Yesterday I sent to this list a message with a zip attach to it (59 Ko) 
with an application in it but for some reason I cannot see the message 
on the list.
I guess It was moderate because of the attachment.

I am trying again without the zip if people are interested by the source 
code please do not hesitate to request it.
Thank you for your help.

Here it is a copy of my previous mail:

Hello,

I am quite new to python and I have complete my first useful application.
I am not really sure that I am sending to right list if  this is a 
mistake I am sorry.

This tiny application is using  wxpython, win32com, py2exe and of course 
python.
This is exactly my problem I am sure there is something wrong in design 
of this application but I cannot tell what.
The objective of this application is to glue together several 
PowerPoint  files and to add a Table of content which is really painful 
to build for a powerpoint containing several hundreds of  slides 
It is really important to be able to either launch it from a cmd prompt 
or to use it through a GUI.


You will find below the point I want to improve of course if there is 
more please do not hesitate:

   - How to call pptGlue.py from the user interface till now I am doing 
it using os.popen2 as below:
os.popen2("pptGlue.exe " + " ".join(commandLine) +" -n" + mergedPptFile)
There is several problems with  this way of doing:
The first one I need to write the exact name of the program,  the 
extension is important. I mean the code can only work before I launch 
py2exe, if  it is pptGlue.py, or after if it is pptGlue.exe. I would 
like to have some thing more generic.

   - Another problem with this call is that I didn't not find out a way 
to display the error message in a dialog box if there is some errors 
neither to send a dialog box if everything went fine.

   - The function that is building the TOC is not working if there is a 
"..."  a title of a slide composing the TOC. It is because "..." seems 
to be propriatary char in MS powerpoint and I cannot print it using the 
python "print" command. This is also important for me because in some 
cases I am just building the TOC in a command prompt to send the result 
to a text file.

   Thank you for your help if this application can be useful to some of 
you I would be more than happy.








More information about the Tutor mailing list