473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

what is _show in python / TkMessageBox?

I was learning python(v2.7) and Tkinter. Suddenly I came across the module TkMessageBox in that I came across a strange thing _show
Expand|Select|Wrap|Line Numbers
  1. def askyesnocancel(title=None, message=None, **options):
  2.     "Ask a question; return true if the answer is yes, None if cancelled."
  3.     s = _show(title, message, QUESTION, YESNOCANCEL, **options)
  4.     # s might be a Tcl index object, so convert it to a string
  5.     s = str(s)
  6.     if s == CANCEL:
  7.         return None
  8.     return s == YES
Why _show is used? What is so special about that _show()? Why it is preceded with an Underscore(_) Chararcter?
May 9 '13 #1
1 1572
bvdet
2,851 Expert Mod 2GB
The leading underscore character is an indicator that the variable is for "weak internal use". Normally you would not call _show() except for module internal use.

BTW - the module is tkMessageBox (note lower case "t")
May 9 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: John Dean | last post by:
Hi I have been reading quite a lot of Python source code recently and I have come across a particular construct which I don't understand. I would be grateful if somebody could explain the reason...
46
by: Reinhold Birkenfeld | last post by:
Hello, another Perl/Python question: the subject says it all. Perl is going to change dramatically to become a more powerful and easier to (read|write) language. Is Python taking a similar...
8
by: MaHahaXixi | last post by:
>>> j = range(20) >>> print j >>> for k in j: if k <= 10: j.remove(k) >>> print j
6
by: Ken Varn | last post by:
Sometimes when I try to close my managed C++ application, the following dialog displays in Win 2000 Pro: The title of the dialog is "Server Busy". The message is "This action cannot be completed...
16
by: Robert Wierschke | last post by:
hi I'm learning python since 3 days. I' ve some programming experience in BASIC, Pascal, C, C++ and Java. Actually I want to add a scripting language to this repertoire (I have virtually no...
1
by: active | last post by:
I tried to use the help on 'controls' to find out what it is used for but there is so many different uses for the word as to make the help useless. So I tried the following. It appears the...
3
laughalot48
by: laughalot48 | last post by:
im new to this entire computer thing. i really dont get anything! what is python?
16
by: SirG | last post by:
I'm looking for an explanation of why one piece of code works and another does not. I have to warn you that this is the first piece of Javascript I've ever written, so if there is a better way or a...
20
by: Cope | last post by:
please tell me what is python.This group is so crowded. Khup http://groups.google.com/group/download-centre
2
by: ganesh22 | last post by:
Hi, Can u explain What is Silverlight? why we want to use that one? Where can i get that Software?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.