Re: [python-win32] How to enable pywin to evaluate -X utf8 flag

2023-06-06 Thread Gualtiero Scotti
Thank you Mark, I'm going to try... I haven't tried your demo yet. My code doesn't work with or without the command line change Best regards Il giorno mar 6 giu 2023 alle ore 16:38 Mark Hammond < mhamm...@skippinet.com.au> ha scritto: > That error typically means your Python code raised an

Re: [python-win32] How to enable pywin to evaluate -X utf8 flag

2023-06-06 Thread Mark Hammond
That error typically means your Python code raised an exception before the service could be started. You probably need some way to track that down - eg, some way to discover stdout/stderr from your service - win32traceutil etc might help depending on how the service is configured. Does the

Re: [python-win32] How to enable pywin to evaluate -X utf8 flag

2023-06-06 Thread Gualtiero Scotti
Thank you Mark for your response, and your explanation.You are right, python.exe is not involved but I thought you handled the flag in your embedded calls.. When I try to start service it doesn't start and the error message is: *Error starting service: The service did not respond to the start

Re: [python-win32] How to enable pywin to evaluate -X utf8 flag

2023-06-06 Thread Mark Hammond
pythonservice.exe doesn't "wrap" python.exe - it's a stand-alone executable which embeds Python. Thus there's no way to pass a cmd-line param to python.exe as python.exe isn't involved. You could patch pythonservice.exe to handle that arg, then do whatever it is python.exe does with that arg.

Re: [python-win32] How to enable pywin to evaluate -X utf8 flag

2023-06-06 Thread Gualtiero Scotti
HI Mark and Hi all, as I wrote previously Mark's solution did not work for me. I need pythonsevice.exe is able to pass -X utf8 parameter to python interpreter or in alternative is able to evaluate evaluate the environment variable PYTHONUTF8=1. Any suggestions? Please help me. Thanks in advance