How to create a shortcut in windows to get rid of the console window
- Open a windows explorer and navigate to the folder the script is saved in.

- Right-click the script and hold the right button while dragging it in the same folder.

- Select the "Create Shortcuts here" option to create a shortcut to the script

- Open another windows explorer and find the directory Python is installed in (For me "C:\Python26")

- Go back to the created shortcut and right-click it.

- Select "Properties" to get the property dialog for the shortcut.

- Go to the "Target" entry box in the properties of the shortcut. Now add the folder python is installed in and a pythonw.exe in front of the script name. (For me "C:\Python26\pythonw.exe"). Then press "ok".

- Double click the shortcut if you want to run the script without a console window. A double click on the script will still start the script with the console window.
Back to index page