Forum: Python Jun 12th, 2008 |
| Replies: 127 Views: 47,083 To get used to wxPython, I took vegaseat's mortgage calculator snippet written in Csharp and converted it to Python. I was surprised how easy it was:
# a simple mortgage calulator using wxPython
#... |
Forum: Python Feb 28th, 2008 |
| Replies: 2 Views: 425 This is a way to do it without slicing:
# separate words with alternating 2 and 3 spaces
# simply alternate between odd and even count
s = 'one two three four five'
space = " "
new = ""... |
Forum: Python Apr 17th, 2007 |
| Replies: 5 Views: 1,042 To save and load a whole object like a list, you have to use the module pickle:
import pickle
myList = [1,2,3,4]
# save/dump the list as an object
file = open("myList.dat", "w")... |