View Single Post
Old 05-26-2018, 06:03 PM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Thanks for pointing me in the right direction.

This low-level OS stuff is way out of my comfort zone. It's taken me forever and a lot of googling to work through it but I think I finally have something which can run lame.exe, handles unicode MP3 tags and produces a returncode using
Code:
retcode = win32event.WaitForSingleObject(process_handle, win32event.INFINITE)
I have a few questions:
  1. Your example in gui2.open_with has the dwCreationFlags parameter set as win32con.CREATE_DEFAULT_ERROR_MODE | win32con.CREATE_NEW_PROCESS_GROUP | win32con.DETACHED_PROCESS.

    I think I need DETACHED_PROCESS for my purposes but please could you explain the other two.
  2. I've just copied your use of 'with sanitize_env_vars()' verbatim without understanding it. Is this OK?
  3. I didn't even know there were utf-8/non-utf-8 versions of Windows. This new CreateProcess method is working for my Win10 x64 setup but will one-size fit all Windows users.
  4. I don't think I need to return stdout/stderr for this particular plugin but I may in the future. Please could you give me a a few pointers how to proceed.
jackie_w is offline   Reply With Quote