View Single Post
Old 04-11-2020, 01:35 PM   #18
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,741
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by carmenchu View Post
Unfortunately, as it MUST be a comma-separated list, without spaces, the code is quite clumsy. A less unwieldy alternative would be appreciated.
Actually, you can save Python lists in the preference file.

Quote:
Originally Posted by carmenchu View Post
Query: are buttons of the message easy to understand, o rather counter-intuitive?
I'd simply use Yes and No to avoid confusion.

Code:
    msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No)
    testmode = [0,1][msg.exec_()== QMessageBox.Yes]

Last edited by Doitsu; 04-11-2020 at 02:39 PM.
Doitsu is offline   Reply With Quote