element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum Python Help!!!
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 0 replies
  • Subscribers 473 subscribers
  • Views 117 views
  • Users 0 members are here
  • python
  • gui
  • calculator
  • programming
Related

Python Help!!!

Jorge_Garcia
Jorge_Garcia over 15 years ago

This may not be the correct group to post this to, but hopefully someone can guide me in the right direction. I've been writing my first Python program and GUI using Python 3.1.2 and Tkinter 8.5. It's a simple program that takes a list of component values and optimizes them to the nearest standard value. I've written a Python module StVaCon,py, that includes all of the necessary functions for the actual algorithm and I have that working.

 

What's giving me a hard time is the Tkinter GUI application. I can't get the bindings to work like they should, I'm 100% sure that most of my problem lies in the three functions of StandardValueConverterV1.py. This is the Python file I'm using to keep the GUI seperate from the main algorithm functions. The UI is pretty simple I use two buttons that use filedialog functions in order to obtain the path to the file that is going to be read, and the file that is going to be written to. I select what Standard Value series I want to use (E6, E12, etc.) and I type in a delimiter (all of the values are brought in scientific notation, I use the delimiter to seperate the coefficient from the exponent, I optimize the coefficient and then tack on the exponent to get the optimized value.).

 

Then I simply press the calculate(calc function in StandardValueConverter.py) button and I should get a (UTF-8) text file at the location I chose. None of the button functions are working properly and I think the problem has to do with the fact that I'm trying to use variables internal to the StandardValueConverter.py module.

 

I've uploaded both files, I've looked at a bunch of tutorials and I just can't seem to find the answer. I consider myself a pretty lousy programmer, so I ask for understanding in that I may be asking a silly question.

 

I appreciate any help in getting this resolved.

 

P.S Any tips on turning this into a stand alone application are would also be helpful.

 

Best Regards,

 

Jorge Garcia

Attachments:
StVaCon.py.zip
StandardValueConverterV1.py.zip
  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube