quit

python console intrupt? and cross platform threads

I want my app to loop in python but have a way to quit. Is there a way to get input from the console, scan it for letter q and quick when my app is ready to quit? in C i would just create a pthread that waits for cin, scans, locks a global quit var, change, unlock and exit the thread allowing my app to quit when its done dumping a file o...

Quiting a PHP script within another PHP page

I'm trying to implement caching for a PHP script I'm writing, but I keep running into the following problem. I want the script to be included in other PHP pages, but when I try to pass the cached file and exit the embedded script it exits both the script and the parent page, but doesn't parse the rest of the code on the parent page. Se...

How to run one last function before getting killed in Python?

Is there any way to run one last command before a running Python script is stopped by being killed by some other script, keyboard interrupt etc. Thanks for your help! ...

Launchd Relaunch App on Quit

Hi Everyone: I am wondering how to set Launchd to relaunch my app if the user has not chosen to choose "Quit" from the top bar. There are cases where something may happen to the app, and it may force quit, and if a preference is selected I want it to relaunch automatically. I have looked into it before posting here, and I have heard t...

What, if any, documentation should be written before quitting a job?

I'm involved in a project where it's in a state that works well for the client, but ultimately needs a lot of intricate supplementary work for future success. If I left tomorrow, the other developers here (well, all but one of them, but he's working on something else) would have a difficult time managing what's been accomplished already,...

How to quit an iPhone app nicely?

or "How to simulate a home button pressed event?" I need to restart my iPhone app, and I want the program to quit, so the user will only have to start it. If I simply use exit(0) some changes won't get saved, as they would if the user quits by pressing the home button. The restart needed for language change. Related code: - (void)on...

FTP error on Quit command

Hi, I'm using a ftp library that causes an error sending the quit command. It seems that the character before QUIT is not recognized. I took a look at the code but didn't find anything. 500 '?QUIT': command not understood Does anyone know what this character can be? ...

Quitting matplotlib.pyplot animation gracefully

I have a script that plots data of some photometry apertures, and I want to plot them in an xy plot. I am using matplotlib.pyplot with python 2.5. The input data is stored in around 500 files and read. I am aware that this is not the most efficient way of inputting the data but that's another issue... Example code: import matplotlib.p...

how to delay application quit time in iphone sdk?

Hello all, I want to register my app for push notification when my application terminates so i think if i delay my app quitting time it could be possible.Does someone knows how to delay application quitting time? I think this method [self performSelector:(SEL)aSelector onThread:(NSThread *)thr withObject:(id)arg waitUntilDone:(BOOL)wa...

I keep getting QUIT and CONNECT HTTP methods sent to my server, what do they mean?

I keep getting the two following errors from my server, I assumed they were just bots looking for potential targets, but does anyone know specifically why I'm getting these? I'm using the SslRequirement plugin to make sure all hits to the login/signup page are redirected to SSL, so all of these weird https requests to root should just b...

IWebBrowser2 Quit method fails with a E_FAIL result

I am hosting the web browser control in my own window. Here are the pertinent steps: CoGetClassObject(CLSID_WebBrowser, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, NULL, IID_IClassFactory, (void **)&pClassFactory) pClassFactory->CreateInstance(0, IID_IOleObject, (void **)&pObject); pClassFactory->Release(); pObject->SetClientSite...

Problems enabling a quit function in Python

Hi, I'm pretty new to programming in general and I'm creating a small game for my younger sister... I have a while loop in which I want to have an option to quit the game, but none of the quitting techniques I know of seem to work: #main game: while 1: input_event_1 = gui.buttonbox( msg = 'Hello, what would you like to do w...

quiting a c# application leaves it in memory

I'm using c# to write a windows form which installs and deploys WSPs to a sharepoint server. The problem I am having is that when I detect a problem and quit the application or when the cross in the top right of the form is pressed the form closes but the task is still in the process list. My quit code is: this.close(); application.qui...

Exiting from C++ Console Program

I currently have a program which has the following basic structure main function -- displays menu options to user -- validates user input by passing it to a second function (input_validator) -- if user selects option 1, run function 1, etc function1,2,3,etc -- input is requested from user and then validated by input_validator ...

Run top, print output, then quit OR how to get real memory usage without top

I'm running Mac OS 10.6. I want to run top to get memory usage, but not in interactive mode, or any mode that updates. I just want memory usage at that point in time then return to prompt. I've looked for other utilities to get memory usage... but came up short (vm_stat is for virtual memory). Can someone direct me how to get top or some...

Invalidating session before iPhone application quits

Hello I would like to tell the server to invalidate an ongoing session when the user quits the iPhone application. In the app delegate, I send a request to the server in the (void)applicationWillTerminate:(UIApplication *)application method. I am not waiting for a server answer, I just want to send the request and quit. However I cant...

C# WebPages : manage Exit events or quit with no user action server side

Hi, What is the better solution to manage Exit or Quit events when user exit to other pages with no action?. This event need to be raised only one time and be usefull to delete all temporary files or datas not stored after the abandon of this page. Is a perfect to use as cleaning method server side. Thanks. ...

Is there a method that tells my program to quit?

For the "q" (quit) option in my program menu, I have the following code: elif choice == "q": print() That worked all right until I put it in an infinite loop, which kept printing blank lines. Is there a method that can quit the program? Else, can you think of another solution? ...

c++ qt quit on action

i got an action in my menu; connect(action, SIGNAL(triggered()), this, SLOT(action1())); but when i executed the function my program always exited. how to solve this? ...

how to disable gps lookup in android again

How am i able to Stop GPS from receiving new signals? was searching for it, just use: if u initialize a LocationsManager Object mLocationManager_ = (LocationManager) mContext_.getSystemService(Context.LOCATION_SERVICE); add an location listener, GPS is starting to a GPS-Lock, mLocationListener_ = new MyLocationListener(mContext_); ...