Why is there no GUI-tools like this for Windows?

2008-07-12 Thread maestro
http://www.youtube.com/watch?v=PXpwC1o5AcI

I have done some GUI-programming for windows with Python but the
Tkinter interface sucked and while it is the only one I tried I got
the impression they are all the same.

It's amazing how retarded a lot of the stuff programmers do is.
Watcing that video, that is how it should be.

I can just do the layout with my mouse and then there is a program
that writes the code for me.
GUI-programming is hard for no reason. One good program then forever
easy...

Is there not something like this for Python/Windows? Is the Linux one
only for ruby or for any language?

Oh well im switching to Linux anyway and mostly write webapps but
still...
--
http://mail.python.org/mailman/listinfo/python-list


while var, but var ==16 != true

2008-07-13 Thread maestro
why does this work?  "while p" = "while p != 0" ? 1 is True and 0 is
false in python but other numbers have no boolean value so why doesnt
it abort.



>>> p=16
>>> p
16
>>> while p:
print p
p -= 1


16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
>>>


i can also do:

>>> k=[]
>>> while k:
k.pop()


>>> k=[1,2,3]
>>> while k:
k.pop()


3
2
1
>>>


so obv while var means while not empty or why not zero but it isnt
something youd guess unless youd beeen shown it.
--
http://mail.python.org/mailman/listinfo/python-list


if len(str(a)) == len(str(r)) and isMult(a, r): faster if isMult is slow?

2008-08-11 Thread maestro
If isMult is slow then:

if len(str(a)) == len(str(r)) and isMult(a, r):
trues.append((a, r))

will be much faster than:

if isMult(a, r) and len(str(a)) == len(str(r)):
trues.append((a, r))

right? seems obvious  but there is no magic going on that wouldn't
make this true right?
--
http://mail.python.org/mailman/listinfo/python-list


setattr and getattr, when to use?

2008-08-22 Thread maestro
Why are these functions there? Is it somehow more idiomatic to use
than to do obj.field ?
Is there something you can with them that you can't by obj.field
reference?
--
http://mail.python.org/mailman/listinfo/python-list