0

I have a Python script that runs in background on Windows. It can be launched with pythonw MyScript.pyc

I would like to do it portable, meaning it should run on Windows machines where no Python is installed. How can I do it?

I tried PyInstaller; it seems to work, however after launching the script it presents a CMD window. I would like it to run in background, without any visible front-ends.

Andy
  • 634
  • 7
  • 19
  • https://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency – GSazheniuk Jun 25 '18 at 15:35
  • My question is specifically about background processes. I don't see the other answers answering it. – Andy Jun 25 '18 at 15:54
  • Once you have .exe executable, you can configure it to run as a service. More info here: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable – GSazheniuk Jun 25 '18 at 16:16

1 Answers1

0

Use the --noconsole option:

pyinstaller --noconsole <filename>
zipa
  • 27,316
  • 6
  • 40
  • 58