Repository: napari/napari

Issue:
Windows Bundled App - Command Prompt on Open
When opening up napari from a bundled install, the user first sees a command prompt window which can hang for a while as the viewer opens.

![image](https://user-images.githubusercontent.com/17995243/96401557-6b650200-121f-11eb-9fab-ff1d818a8d74.png)

This is mentioned briefly in the installation tutorial.

![image](https://user-images.githubusercontent.com/17995243/96401581-80419580-121f-11eb-9e1a-ef21905caa25.png)

Today I observed a technically inexperienced user go through the installation process. The user did not notice this section in the tutorial, and when the command prompt opened there were two reactions:

1. Concern that she would have to type code into the command prompt
2. Misunderstanding that the command prompt window was actually napari and there was nothing left to load

I think we can improve the documentation by including a screenshot of the window in the tutorial, which might be more eye catching than the text alone.

I ideally though, the command prompt window itself could say something such as "Loading napari..." or anything that tells the user to wait. I'm not sure whether this is possible, however.


Discussion:
Go ahead and improve the docs with whatever you feel might help reduce confusion. Screenshots, clearer explanations, whatever helps! 

> I ideally though, the command prompt window itself could say something such as "Loading napari..." or anything that tells the user to wait. I'm not sure whether this is possible, however.

I don't think this is possible, sadly.
@GenevieveBuckley 

> I don't think this is possible, sadly.

Can you elaborate? This is a known issue with briefcase? Or Python apps more broadly? 
I don't think it has anything to do with briefcase @jni, I think this is just what (some? all?) python apps on Windows do. I've seen the same thing happen when you launch CellProfiler on Windows too.

*Maybe* you could fiddle with the launch command to add `echo 'Starting napari...'` before the actual call that starts napari, but I'm not entirely sure if you'd see that or not, or how easy it would be. 
> I think this is just what (some? all?) python apps on Windows do. I've seen the same thing happen when you launch CellProfiler on Windows too.

Maybe @0x00b1 can shed some light on the whole thing, then?
fwiw, I found some related materials: 
https://docs.python.org/3.3/using/windows.html#executing-scripts-without-the-python-launcher
https://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe

so, we could work around this particular prompt through pythonw executor. However, it comes with the tradeoff of stdout and stderr going to nowhere and we won't be able to see error messages unless we display them in GUI
> 
> 
> fwiw, I found some related materials:
> https://docs.python.org/3.3/using/windows.html#executing-scripts-without-the-python-launcher
> https://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe
> 
> so, we could work around this particular prompt through pythonw executor. However, it comes with the tradeoff of stdout and stderr going to nowhere and we won't be able to see error messages unless we display them in GUI

Thanks @ziyangczi 
That tradeoff does seem potentially worrying (although maybe this is the situation we *already* have for the Mac bundled app anyway?

I think we should update our docs to reassure users about the command prompt window as it currently exists. It's easy enough to update the docs again if/when we make another change to improve things later on.
@DragaDoncila would you like to make a PR adding a screenshot and some text you think would help to reassure users?
@GenevieveBuckley @ziyangczi thank you for looking into this. I tend to agree that not receiving error output to the console could be a huge detriment. I will update the docs with screenshots and text later this afternoon or tomorrow
@DragaDoncila just wondering if you ended up making a PR to the tutorials about this, thanks!
@sofroniewn yep you can find that merged [here](https://github.com/napari/tutorials/pull/94)
Perfect, thanks @DragaDoncila, I will close this issue then!
@sofroniewn if you don't mind I'd like to keep this open given @ziyangczi's comments — I think long term we want to get rid of the command prompt altogether. As far as I know we don't have a separate issue tracking that?
circling back to this issue, now that we are using GUI to track the error messages as pop ups, are people comfortable moving forward with pythonw to drop the prompt window?
Yeah, let's drop the window for bundled apps on windows 

Resolving patch:
diff --git a/bundle.py b/bundle.py
--- a/bundle.py
+++ b/bundle.py
@@ -263,9 +263,7 @@ def bundle():
 
         add_site_packages_to_path()
 
-        if WINDOWS:
-            patch_wxs()
-        elif MACOS:
+        if MACOS:
             patch_python_lib_location()
 
         # build


Test patch: