I am currently working on making a program using tkinter that when pressing a button it opens the Python program, however I am having some problems with it. I have tried using os.system('filename.py'). That opens the file, but then crashes the GUI, making the user have to restart the GUI. I have also tried importing it as a module but that just does the same as when using os.system.   Can anyone possibly help me open a Python file in a completely new window/terminal?
My little brother is just getting into programming, and for his Science Fair project, he's doing a simulation of a flock of birds in the sky. He's gotten most of his code written, and it works nicely, but the birds need to move every moment.  Tkinter, however, hogs the time for its own event loop, and so his code won't run. Doing root.mainloop() runs, runs, and keeps running, and the only thing it runs is the event handlers.  Is there a way to have his code run alongside the mainloop (without multithreading, it's confusing and this should be kept simple), and if so, what is it?  Right now, he came up with an ugly hack, tying his move() function to &lt;b1-motion&gt;, so that as long as he holds the button down and wiggles the mouse, it works. But there's got to be a better way.
I have a regular C# code. I have no exceptions. I want to programmatically log the current stack trace for debugging purpose. Example:  public void executeMethod()  {     logStackTrace();     method(); } Superscript outside math mode What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside? $f(z)=\frac{z}{1+|z|} $ Is 1-1? How to know if Mac OS X machine is being remotely viewed? Currently I have no way to know if my machine is being remotely viewed by our tech support, and would prefer to know, given the massive privacy breach that would entail should this be happening. I am running Mac OS X Snow Leopard.  Running  ps -A | grep Remote   I know this service is running:  /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent   My knowledge of administration of Macs on a network is limited, so I don't know what tools allow this. How to convert Strings to and from UTF8 byte arrays in Java In Java, I have a String and I want to encode it as a byte array (in UTF8, or some other encoding). Alternately, I have a byte array (in some known encoding) and I want to convert it into a Java String. How do I do these conversions? Why does Calculate button remain gray in Group Stats Plugin for QGIS? In my case I failed to use  plugin (2.0.30) with QGIS 2.14.11 and 2.18.3 on windows64.  Tested on several datasets: points, polygons, and csv.- But I am not sure what I have missed.    I want to click on this Calculate button. Is there a direct proof that $\pi$ is not constructible, that is, that squaring the circle cannot be done by rule and compass?  Of course, $\pi$ is not constructible because it is transcendental and so is not a root of any polynomial with rational coefficients. But is there a simple direct proof that $\pi$ is not a root of polynomial of degree $2^n$ with rational coefficients?  The kind of proof I seek is one by induction on the height of a tower of quadratic extensions, one that ultimately relies on a proof that $\pi$ is not rational. Does any one know of a proof along these lines or any other direct proof?  I just want a direct proof that $\pi$ is not constructible without appealing to transcendence. Android: textview hyperlink Undecidable language problems. I am using an APEX batch to process and insert large amounts of data. Essentially I would like it to process every row to catch any errors with the data and then rollback the entire batch if a single error is found. Is there any simple way to do this?  I have tried using a Save Point, but because they are not serialisable, it doesn't work across the entire batch.   Just to clarify, by error I mean an error that I have defined, error with validation, etc. Not an Exception thrown by the system. Which equals operator (== vs ===) should be used in JavaScript comparisons? I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==? How to subtract a day from a date? I have a Python  object. What is the best way to subtract one day? Three linked question on non-negative definite matrices. 1.a symmetric matrix in $\mathbb{M}_n(\mathbb{R})$ is said to be non-negative definite if $x^Tax≥0$ for all (column) vectors $x\in \mathbb{R}^n$. Which of the following statements are true? (a) If a real symmetric $n\times n$ matrix is non-negative definite, then all of its eigenvalues are non-negative. (b) If a real symmetric $n\times n$ matrix has  all of its eigenvalues are non-negative , then it is non-negative definite. (c) If $ A\in \mathbb{M}_n(\mathbb{R})$, then $AA^T$ is non-negetive definite. 2. only one of the following matrices is non-negetive definite. Find it. (a) $\begin{pmatrix} 5 &amp; -3 \\ -3 &amp; 5 \end{pmatrix}$. (b) $\begin{pmatrix} 1 &amp; -3 \\ -3 &amp; 5 \end{pmatrix}$. (c) $\begin{pmatrix} 1 &amp; 3 \\ 3 &amp; 5 \end{pmatrix}$.      3.let $B$ be the real symmetric non-negative definite $2×2$ matrix such that $B^2=A$ where $A$ where is the non-negetive definite matrix in question $2$.write down the characteristic polynomial of $B$.      My thoughts..  For1.  (a) &amp; (b) are true but not sure about (c). For 2. (a) is the correct option since it has all positive eigen values.they are $2,8$. For 3. Eigen values of $B$ will be $\sqrt{2}$ and $\sqrt{8}$. So the answer is $x^2-3√2x+4=0$.      Can anybody help me to verify the solutions of the above problems. I would like to align the view straight on to a face, perpendicular to the normal. How do I align the 3D viewport to the face of a mesh? Should you declare methods using overloads or optional parameters in C# 4.0? I was watching , and it got me thinking about when optional parameters are available in C# what is going to be the recommended way to declare methods that do not need all parameters specified?  For example something like the FileStream class has about fifteen different constructors which can be divided into logical 'families' e.g. the ones below from a string, the ones from an IntPtr and the ones from a SafeFileHandle.  FileStream(string,FileMode); FileStream(string,FileMode,FileAccess); FileStream(string,FileMode,FileAccess,FileShare); FileStream(string,FileMode,FileAccess,FileShare,int); FileStream(string,FileMode,FileAccess,FileShare,int,bool);   It seems to me that this type of pattern could be simplified by having three constructors instead, and using optional parameters for the ones that can be defaulted, which would make the different families of constructors more distinct [note: I know this change will not be made in the BCL, I'm talking hypothetically for this type of situation].  What do you think? From C# 4.0 will it make more sense to make closely related groups of constructors and methods a single method with optional parameters, or is there a good reason to stick with the traditional many-overload mechanism? When I melt 16 oz of chocolate I add 4 oz of oil how long can I keep this and how should it be stored. Someone said something about botulism ?? For usability reasons, for example in , the 'viewed' counter should show as  ...instead of... . It's much harder to decipher that there are a million views on the question just by looking at it.  Some people in the comments pointed out internationalization concerns with it. I do think that since there might be a problem with it, that spaces would probably be a better idea. What data type to use for hashed password field and what length? I'm not sure how password hashing works (will be implementing it later), but need to create database schema now.  I'm thinking of limiting passwords to 4-20 characters, but as I understand after encrypting hash string will be of different length.  So, how to store these passwords in the database? Inverse Fourier transform of Gaussian I need to calculate the Inverse Fourier Transform of this Gaussian function:  $\frac{1}{\sqrt{2\pi}} exp(\frac{-k^2 \sigma^2}{2})$  where $\sigma &gt; 0$, namely I have to calculate the following integral: $\int{\frac{1}{\sqrt{2\pi}} \exp(\frac{-k^2 \sigma^2}{2})} \exp(ikx) dk$.  How can I do that? If I am not wrong (in which case please correct me) the result should be $\frac{1}{\sqrt{2\pi}\sigma}exp(\frac{-x^2}{2\sigma^2})$...but I don't know how to get there! How do I fix the left mouse opening the menu instead of breaking blocks?