I'm running Windows 7 and am trying to run nosetests.
It's been installed and I can run it successfully, except that when I do run it (by typing 'nosetests' in the cmd window), it'll open a new cmd window with the output - but this window closes before I can see what it says. How do I prevent the results from closing so I can see them?
I'm a real n00b, in case you hadn't noticed.
Related
I'm running my code in the external Terminal. When I get to the end of my program, the Terminal automatically closes.
Is there a way to keep it open, like the "pause" command on Windows?
Working on Windows as well
Thanks for the help
I'm running a command through the Windows shell- an existing command window (cmd.exe). When I execute the command, the window closes, even though it's a freestanding window not tied to the command.
How can I keep the window open to see the output?
You can't simply start a child cmd session because it'll share same window and if your custom tool actively closes its window (I wonder why) then it'll close your console and output will disappear.
There isn't much you can do if a program want to close console window but you can at least save its output to a file (to be inspected later with type). If you're working with that console and you don't want to close it then you can use start cmd to execute it in a new console window. Like this:
start cmd /c tool -args ^> output.txt
tool output will be available in output.txt after it finished.
It appears that the executable is closing the command window. Here is what you could try, may work. open a command shell. In the shell issue "cmd" and open another command shell. Run your executable in the newly opened command shell. You nested cmd will be exited, but you may still be able to see some of the output of your executable.
I built a Lazarus GUI application using Ubuntu and then took it onto Windows to compile. On Ubuntu I run it from the terminal like this:
./prg arg
It runs fine using the argument arg passed to it. On Windows this is what I did:
Create shortcut to exe
Edit shortcut and include the argument.
To run on Windows, I run the shortcut.
It works fine but there's an additional terminal window opening behind the application, when I run the shortcut. When the application exits, the window closes with it. The terminal window is empty.
On Windows, before compiling I had to uncheck the -WG switch in compiler options. This was because althought the app is GUI-based, there is a simple routine that checks for the argument passed at command line and uses Writeln to output a message if there were errors.
My key question is why is this terminal window coming up on Windows and how do I get rid of it or suppress it?
Thanks!
(1) Make sure you have set {$APPTYPE GUI} in your code. Otherwise there will be always a "terminal" opened on windows.
(2) Maybe you are confusing a "real" shortcut (*.lnk) with cmd/batch file? The latter also opens a terminal that dies when the lauched app closes.
I just started using opencv 2.4.0. So after installing, I tried to copy a sample code from here to my project. So click on F5 then a cmd screen opens then closes immediately. I tried googling but didnt find a solution. What am I doing wrong?
Go cmd, and go exe's directory, but before find a video file, copy it to that working directory too.
cd WhereYourApplicationExe
yourapplication.exe avideofile.wmv avideofile.wmv 10 1
Since it's a console application, you can either add
cin.get();
return 0;
in your Main block. This ensures that the prompt window will wait for user input before closing as, at the moment, the code is executed and the command prompt window is closed upon completion.
Alternatively, if you don't need the debugger, you can press CTRL + F5 to run it.
Vim under win32 opens a command prompt (vimrun.exe actually, which opens in a terminal window) on every external command, silent or not. Yes, the terminal closes automatically, but it is still quite annoying.
This makes plugins that make extensive use of external commands, such as syntastic (it runs a command on buffer open/save), a real pain.
Is there some way to fix this behavior? What I want is for the terminal to open only for non-silent commands.
Rather than just ![windows command] you might try:
!start /min [windows command]
Alternatively, if you define a shortcut to a windows app you can click on the shortcut's properties and set it up to run as 'Minimized' rather than as 'Normal'
In both cases above an app button will show up on taskbar as the app is opened, as there would be for any minimized application. But it's less intrusive than having an actual window open.
NOTE The !start command solution runs the command asynchronously, resumes Vim immediately without waiting for the command to complete, which may often not be what you want. In that case the use of shortcut set up to run as minimized is better solution.
Just to bring closure: I wrote a replacement runner utility for Vim on Windows that doesn't open a visible command prompt. Here it is: vimrun-silent.