Hello Everyone ! Well ... I am writing an IRC bot in python. I wish to make stand-alone binaries for Linux and windows of it. And mainly i wish that when the bot initiates .. the console window should hide and the user should not be able to see the window. What can I do for that ? The python way will be better.
+2
A:
In linux, just run it, no problem. In Windows, you want to use the pythonw executable.
Update
Okay, if I understand the question in the comments, you're asking how to make the command window in which you've started the bot from the command line go away afterwards?
- UNIX (Linux)
$ nohup mypythonprog &
- Windows
C:/> start pythonw mypythonprog
I think that's right. In any case, now you can close the terminal.
Charlie Martin
2009-04-19 01:44:08
Thats not the main issue ... The main issue is to hide the console window then the program is running.How do it do that ?
2009-04-19 01:47:20
You mean the one you're starting it from?
Charlie Martin
2009-04-19 01:52:01
Change file extension to .pyw to associate with pythonw.exe http://oreilly.com/catalog/pythonwin32/chapter/ch20.html
Adam Bernier
2009-04-19 01:52:12
2009-04-19 02:42:19
okay, if puython isn't installed, you've got another problem. You want py2exe to build a standalone executable. http://logix4u.net/Python/Tutorials/How_to_create_Windows_executable_exe_from_Python_script.html and http://www.py2exe.org/index.cgi/FrontPage
Charlie Martin
2009-04-19 03:58:52
+4
A:
Simply save it with a .pyw extension. This will prevent the console window from opening.
mdec
2009-04-19 01:51:12