473,770 Members | 6,091 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 1801
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
6946
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 combination of them all. What worked for me was the following: 1. Put a Break Point in MFC source file DLGDATA.CPP on line 338 which is: TRACE0("Warning: skipping non-radio button in group.\n"); (Copyright
24
4567
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 resources and memory - both appear to be in order. Can anyone comment on this? Should CreateDialogIndirect() which is located in dlgcore.cpp ever fire a button click routine??
10
6104
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 button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
4
3394
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 to a pmw dialog with (apply and cancel options ) i.e. when I press enable btn dialog pops up and asks to confirm the my choice and if apply is selected then run my enable script if cancel then close the dialog. the same with the other radio...
11
2278
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 6.something I think and running as a service, Using NoteTab Pro as an IDE (works well). If you need more, just ask. In one functioning form:
0
9595
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9432
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10008
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7420
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.