# Make a window pop up as a forefront window

#1

I use Script package to run a python code. When I run a script, a pop up window always runs behind atom program. I have to minimize atom program or move it to see the pop up window. It happens when I use Hydrogen package as well. How can I make a window pop up as a forefront window?

#2

I have not encountered the script package opening a new window. When I run things in script, the output always appears at the bottom of the text editor. Since I have no experience with the behavior you describe, I need to understand the environment so that maybe I can repeat the behavior. What operating system are you running? What version of script? Of Atom? What is the code that you’re running?

#3

I use Atom 1.18 and Script 3.15 on MacOS Sierra 10.12.6.
The code below creates a plot on a new window.

import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

mu, sigma = 100, 15
x = mu + sigma*np.random.randn(10000)

# the histogram of the data
n, bins, patches = plt.hist(x, 50, normed=1, facecolor='green', alpha=0.75)

# add a 'best fit' line
y = mlab.normpdf( bins, mu, sigma)
l = plt.plot(bins, y, 'r--', linewidth=1)

plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
plt.axis([40, 160, 0, 0.03])
plt.grid(True)

plt.show()

#4

I’m on Windows 10, and when I try that, the plot pops up as a foreground window. This is me using the ctrl-shift-b keybinding for script.