473,498 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Radio button error in dialog box

20 New Member
When we run this piece of code, we are getting a following error.

output error
File "src/lib/parametric/gen_freeze/Tkinter.py", line 1558, in init
AttributeError: 'module' object has no attribute 'argv'


piece of code

Expand|Select|Wrap|Line Numbers
  1. from Tkinter import *
  2.  
  3. class TestMenu:
  4.     def __init__(self, master):
  5.         self.master = master
  6.         self.menubar = Menu(self.master)
  7.  
  8.         self.radmenu = Menu(self.menubar)
  9.         self.radmenu.add_radiobutton(label='A')
  10.         self.radmenu.add_radiobutton(label='B')
  11.         self.radmenu.add_radiobutton(label='C')
  12.         self.radmenu.add_radiobutton(label='D')
  13.         self.radmenu.add_radiobutton(label='E')
  14.         self.radmenu.add_radiobutton(label='F')
  15.         self.radmenu.add_radiobutton(label='G')
  16.         self.radmenu.add_radiobutton(label='H')
  17.         self.radmenu.add_radiobutton(label='I')
  18.  
  19.         self.menubar.add_cascade(label="Radiobutton Menu", menu=self.radmenu)
  20.  
  21.         self.top = Toplevel(menu=self.menubar, width=500, relief=RAISED,borderwidth=2)
  22.  
  23. def main():
  24.     root = Tk()
  25.     root.withdraw()
  26.     app = TestMenu(root)
  27.     root.mainloop()
  28.  
  29. if __name__ == '__main__':
  30.     main()
Can you help me to know how to fix my error.

Thank You
Jul 14 '08 #1
2 1787
Laharl
849 Recognized Expert Contributor
Works fine when I run it.
Jul 14 '08 #2
nicstel
20 New Member
Works fine when I run it.
Yes you are right. But my real question is I want to know if I
can run Tkinter script into other program, like Autocad or SDS2?

Thank You
Jul 14 '08 #3

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

Similar topics

1
6886
by: Rick | last post by:
After being frustrated with this issue on several occasions I think I found the secret sauce for solving the issue after reading a few different messages about what others thought and trying a...
24
4464
by: John Gabriel | last post by:
CreateDialogIndirect() fires my Radio button click function without the radio button having being clicked. I am using VC++ 2003.NET. I believe this is yet another Microsoft bug. Have checked dialog...
10
6045
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
4
3368
by: joseff | last post by:
Hi evryone!! I' m very new not only to Python and Tkinter but to programing. I'm a bit stuck here and would be grateful for some help. I have 3 radio select buttons(see below) which I want to link...
11
2255
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
0
7125
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
7002
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
7205
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
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
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,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.