Every time I try to run a script with pythonw instead of python, it'll show up in the task manager for a split second and then crash. I am currently working on a discord bot and have the bot message the server every time the script successfully runs, and the bot never says anything but it does when I use normal python to open it
Asked
Active
Viewed 614 times
2
-
1Can you get `pythonw` to execute other scripts? Creating a file for example? – Patrick Haugh Jun 08 '18 at 01:49
-
@PatrickHaugh apparently so – NinjaNube008 Jun 08 '18 at 02:04
-
Have you seen [this question?](https://stackoverflow.com/questions/24835155/pyw-and-pythonw-does-not-run-under-windows-7) – Patrick Haugh Jun 08 '18 at 02:05
-
@PatrickHaugh that doesn't seem to work – NinjaNube008 Jun 08 '18 at 02:18
2 Answers
1
For others who arrive here because they have the same "pythonw shows up in Task Manager briefly and then crashes" problem, it's worth noting that this will happen if you try to execute invalid Python code with pythonw.exe. No errors are displayed, but errors are displayed if you try to run invalid Python code with python.exe, as shown in this screenshot:

Doug Mahugh
- 624
- 6
- 15
0
A Discord bot isn't something suitable to run with pythonw. All of the context is in the terminal. I used heroku to host my discord bot. I also used this video to help with the setup.

NinjaNube008
- 43
- 1
- 8