ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-win32
python-win32
Re: [python-win32] saving an ole control object embedded in a powerpoint
by Mark Hammond other posts by this author
Feb 20 2006 2:47PM messages near this date
[python-win32] saving an ole control object embedded in a powerpoint | [python-win32] Excel Application
>  The problem is that I don't know how to obtain something that would be
>  accepted as an IStream (through python/com machinery) and that would
>  write everything to a file or in a string, and that I can read later.

Look at the win32com.server.util FileStream class.  Usage would be something
like:

from win32com.server.util import wrap, FileStream

f = open(filename, "wb")
fs = FileStream(f)
# Turn it into a "real" COM object.
fs = wrap(fs)
# Pass it to COM
pythoncom.OleSaveToStream(persist, fs)

Untested, but that is the idea.

Mark

_______________________________________________
Python-win32 mailing list
Python-win32@[...].org
http://mail.python.org/mailman/listinfo/python-win32
Thread:
Bertrand Mathieu
Mark Hammond

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved