473,396 Members | 1,738 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,396 software developers and data experts.

Number formats in wxpython

I am developping a small Python/wxPython app to track expenses. A
bunch of information is collected in a wxGUI consisting of text
controls, comboboxes and a small grid. Some values are not put in by
the user, but are calculated (e.g. the price of 789 g apples when 1 kg
is 1.99 € or the mean fuel consumption of a car when the user puts in
the amount of fuel and the driven distance). The values from the
calculations and from the user inputs are stored in an external file.
I would like to define the format of currency information by setting
the number of digits after the decimal point to two. THe information
displayed in the grid can be controlled by using cell renderers, but
the do not influence the output. Is there something like number
formats in wxPytghon, such as the formats known from Mic++++++'s
ex***?
Thanks a lot
Peter
Jul 18 '05 #1
1 1742
Piet wrote:
I am developping a small Python/wxPython app to track expenses. A
bunch of information is collected in a wxGUI consisting of text
controls, comboboxes and a small grid. Some values are not put in by
the user, but are calculated (e.g. the price of 789 g apples when 1 kg
is 1.99 € or the mean fuel consumption of a car when the user puts in
the amount of fuel and the driven distance). The values from the
calculations and from the user inputs are stored in an external file.
I would like to define the format of currency information by setting
the number of digits after the decimal point to two. THe information
displayed in the grid can be controlled by using cell renderers, but
the do not influence the output. Is there something like number
formats in wxPytghon, such as the formats known from Mic++++++'s
ex***?


Take a look at the MaskedEditCtrl classes in the library.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: SeeBelow | last post by:
Do many people think that wxPython should replace Tkinter? Is this likely to happen? I ask because I have just started learning Tkinter, and I wonder if I should abandon it in favor of...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
1
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have...
1
by: Roger | last post by:
I am currently working on an application that is being used mostly in the US but recently has been purchased by several users outside the US, mostly in South America. The application uses an...
25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
5
by: Kamaluokeakua | last post by:
I have to write an application that deals with clients in multiple countries. The addresses, phone numbers, country id and currency information has to be stored into a database that allows for the...
12
by: Sam | last post by:
Hi, How can I check if a string corresponds to a valid number format ? e.g : 1,000.00 1.000,00 1 000,00 1'000.00 How to check the above are valid number formats ?
1
by: womblesjc | last post by:
I have a data bound Details View control in asp.net 2.0 that formats a phone number. The 'Default Mode' for the control is set to Edit. The phone number field is a template field and I can...
4
by: stef | last post by:
hello, I'm trying to move from Delphi to Python (move from MatLab to Python already succeeded, also thanks to this discussion group). From the discussions in this list about "the best" GUI for...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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
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.