Windows-specific Python Packages and Preview

Richard Kimberly Heck rikiheck at gmail.com
Sun Mar 12 20:27:57 UTC 2023


On 3/12/23 09:06, Yu Jin wrote:
> Am So., 12. März 2023 um 01:43 Uhr schrieb Richard Kimberly Heck:
>
>     On 3/11/23 03:22, Yu Jin wrote:
>>     Am Sa., 11. März 2023 um 08:31 Uhr schrieb Yu Jin:
>>
>>         Am Sa., 11. März 2023 um 07:09 Uhr schrieb Richard Kimberly Heck:
>>
>>             On 3/10/23 17:04, Jean-Marc Lasgouttes wrote:
>>             > Le 10/03/2023 à 22:21, Yu Jin a écrit :
>>             >> all the win* imports from lyxpreview_tools.py fail,
>>             but those are in
>>             >> a try-except block
>>             >
>>             > What do we gain when they ar present? It might be
>>             important enough to
>>             > warrant having those modules.
>>
>>                  try:
>>                      import pywintypes
>>                      import win32con
>>                      import win32event
>>                      import win32file
>>                      import win32pipe
>>                      import win32process
>>                      import win32security
>>                      import winerror
>>                  except:
>>                      sys.stderr.write("Consider installing the PyWin
>>             extension
>>             modules " \
>>                                       "if you're irritated by windows
>>             appearing
>>             briefly.\n")
>>
>>         Just checked, those imports also fail in the Python2 package
>>         which I've used so far.
>>
>>     I have found a way of installing pywin32 into the
>>     embeddable package, it is considered a hack on the web, because
>>     the embedded python is not meant to be enhanced with more
>>     packages, but it works. With the pywin32 package installed using
>>     that hack the imports work. But there are 2 things resulting from
>>     the "hack":
>>     1. there is a bit of manual work to do when updating the python,
>>     I can document it though, so not a big deal.
>
>     That part seems fine.
>
>
>>     2. The python package gets significantly larger (50MB vs 18MB
>>     unzipped) and also the LyX installer itself when finished (65MB
>>     vs. 55MB).
>
>     Not a big deal either.
>
>
>>     So what would you say? Is pywin32 needed or do I skip it?
>
>     Did you see my message about what this is supposed to do? Suppress
>     certain windows (terminals, I guess) from appearing when we're
>     doing certain things? If so, perhaps it would be worth seeing just
>     how annoying those windows are. If the answer is "not very", then
>     maybe it isn't worth the trouble.
>
> Yeah I could test that as well, I just don't know what those "certain 
> things" are, what should I do for testing?

It would presumably involve the scripts where these modules are called. 
It looks like it involves preview, possibly of images and PDFs, maybe of 
math too?

Riki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230312/d88514e2/attachment.html>


More information about the lyx-devel mailing list