-2

This seems to be a basic question, but the tricky part is, that I want that to work without having to care for any sort of GUI (if possible).

So, I have a program, that runs for some time, while I do other stuff. Which possibilities do you see, to notify the user, that the program has finished (let's stick to graphical hints, while sounds, mails, sms could be interesting elsewhere)?

Is there an easy way, to get e.g. a popup message, bringing the shell-window on top or else from within python without having to use a GUI?

I'm working right now in the gnome-shell with ipython. But other answers suitable for idle or spyder seem also to be interesting.

4

1 回答 1

1

GUI is the simplest and the most effective:

First of all install easygui from here and then try this code:

import easygui

easygui.msgbox("This is a message!", title="simple gui")

For more GUI programming in python this tutorial is very helpful...

If you don't want to do any GUI then you can do the following: You can basically play an alerting sound to the user:

 def playSound():
     counter = 0
     while(counter < 10):
         print '\7'
         counter += 1

 #on completion of task
 playSound()
于 2013-08-14T12:01:33.513 回答