Why my python script sometimes stopping and waiting for keypress? - python-3.x

I noticed something on my script. Sometimes it stops and when I press any keys on my keyboard it resumes. I didnt put any keypress command on my script. It's running on a windows vps.
Any idea why is this happening?

I found the issue. When i clicked on the terminal the script pauses. To fix this go to terminal properties then uncheck the quick edit.

Related

Vim freezes consistently for several reasons

Vim freezes and I see a key sign as I have circled in the picture below when doing the following things
When opening a new file in terminal vim, especially a cpp file.
When terminal vim is left idle for a few seconds
When I click outside the terminal window and then click back into terminal vim.
Ctrl-c unfreezes vim.
This is 100% reproducible on terminal vim, and not reproducible at all on MacVim. I am on MacOS.
When vim is launched from MacOS terminal app (and not iterm), I get a blinking key, and vim freezes just the same.
Please help me unfreeze vim, I've been digging for a while and not come up with anything.
Maybe one of your plugins/custom config is playing the devil here. Would you try and see if the same problem exists while running vim without any custom configurations, like :
vim --clean
if it works as expected, then you should definitely take a look into your .vimrc and start cleaning it.
If the error persists even after running vim clean, then what i would have done would be to check if the shell configs (like .bashrc,.bash_profile etc) for unwanted settings that directly/indirectly affect the working of vim.
As a last resort to avoid confusion, you should also try to debug whether you have given any custom setting for your terminal emulator. Try reinstalling your terminal emulator or run it clean and see if it helps.

Resharper Test Runner steals focus

Though one: whenever I run a test with R# using a hotkey (CTRL+U, CTRL+R), the runner window get focus. It's ruining my performance.
Does anyone have any clue as to what I did to cause that? IIRC, this wasn't so until yesterday.
I have not worked out how to stop this from happening, but the following shortcuts do help:
Ctrl+Tab (Navigate between files opened in the editor, and tool windows.)
Shift+Esc (Close current tool/window.)

Program stops execution if window loses focus. Why?

I am running a big python script on a bash terminal. The problem is that everytime I use Alt+Tab or click outside the terminal into another windows (Say, google-chrome), the program stops execution. Then I need to put the terminal back in focus by clicking inside it to resume execution. This keeps happening all the time.
What could be wrong?

start gvim without it taking focus from the terminal that started it

I would really like to find a way to start gvim without the terminal losing focus.
I found a way to use gvim to display code when debugging in dbx.
Gvim as dbx frontend
This works great but it causes gvim to steal the focus every time it hits a breakpoint or changes line.
I am pretty sure I could adapt a terminal keeping focus to work inside dbx.
I am running solaris on a sparc processor.
How can I start gvim without it taking focus from the terminal that started it?
If you're a KDE user, you can start gvim with the kstart command. The kstart program has extensive options for controlling the behavior of the program you're starting. The --onbottom option might accomplish what you're trying to do.

AppleScript - alert window issue when using launch command

I have downloaded an application from internet(from Chrome browser) named "a.app", and there will be an alert window shown if I launch it, see the bellow figure.
The problem is, when I double click on a.app, the alert dialog will show up immediately, but if using the following AppleScript, the dialog will wait up to 20 seconds before it appears.
tell application "a.app" to launch
20 seconds go beyond my patience, so I wonder if it is possible for AppleScript to perform just as manually double click on a.app, that is, how to show up the alert dialog the moment I launch a.app by way of AppleScript.
Any ideas, thanks in advance.
Two options:
Remove the quarantine after downloading the App (like Asmus mentioned):
do shell script "xattr -r -d com.apple.quarantine /path/to/the/dmg"
Permanently disable the warning by running this AppleScript line once.
do shell script "defaults write com.apple.LaunchServices LSQuarantine -bool NO"

Resources