Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm using win32com with python to generate Automated PowerPoint pptx files.

My scripts are generally ran on window based machines.

Apparently, because I'm using win32com my scripts wouldn't work on other hardware/Operating systems - Max/Linux/other.

Is this really the case? if so, is there a solution?

Whatever relied on win32com won't work, if it isn't mission critical, just comment out the parts that rely on it. user1121588 Jul 28, 2015 at 9:28 As far as I can tell python-pptx has no windows dependencies and should work on Linux as well as on Windows for creating PowerPoint files. user4322779 Jul 28, 2015 at 9:51 that's correct python-pptx has no windows dependencies however it's still a fairly young library so its missing bits and bobs. Boosted_d16 Jul 28, 2015 at 11:17

When you use win32com, you are communicating with Windows programs, in this case PowerPoint.

So, no, it won't work without the Windows program, which means it typically won't work without Windows, although you might be able to make it work if you install PowerPoint on WINE and then use the Windows version of Python with it. There was a question and answer about this technique here:

automating excel with win32com on linux with wine

Other options (that don't require installing PowerPoint on Linux) include automating a cross-platform package like OpenOffice/LibreOffice, or (since you're using Python) using restructuredText and S5 to create slides.

Edit: As Tris Nefzger points out above, there is a cross-platform Python package designed specifically for creating PowerPoint slides, as well.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .