Re: trouble with wxPython intro

2007-05-31 Thread Daniel Gee
That's so simple I'm embarrassed. I should have noticed the change from the example before to this one. It works now, thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: paste text with newlines into raw_input?

2007-05-30 Thread Daniel Gee
#!/usr/bin/python print paste quote: emptycount = 0 lines = [] while emptycount 2: t = raw_input() if len(t) == 0: emptycount +=1 else: emptycount=0 lines.append(t) lines.append(\n) quote = .join(lines[:-3])

trouble with wxPython intro

2007-05-30 Thread Daniel Gee
I'm trying to learn WxPython with the tutorial: http://wiki.wxpython.org/Getting_Started But I can't seem to get the example for events to work. I pasted the code they had directly into an interpreter and it got a dialog to appear and the program was able to close itself, but my own copy won't

Translating some Java to Python

2007-05-20 Thread Daniel Gee
A while ago I wrote a class in Java for all kinds of dice rolling methods, as many sides as you want, as many dice as you want, only count values above or below some number in the total, things like that. Now I'm writing a project in Python that needs to be able to make use of that kind of a

Re: Translating some Java to Python

2007-05-20 Thread Daniel Gee
Alright, sounds good. I'm just not as familiar with the preferred designs of python. As to wanting to have them in a class, sometimes I do. Persisting a roll in a class is only for the slightly more complicated rolls such as 3d6+5d4-1d12 or 4d6 (drop the lowest and re-roll ones), things of that

Re: Python editor/IDE on Linux?

2007-04-15 Thread Daniel Gee
In Linux I just use Gedit. In windows I settle for Notepad2. With python having help built into the interpreter, anything more than line numbering, simple syntax highlighting, and auto-indent when you hit enter just doesn't seem necessary. Vim has b and c, but not a. Using Kate for Python would

Re: is laziness a programer's virtue?

2007-04-15 Thread Daniel Gee
You fail to understand the difference between passive laziness and active laziness. Passive laziness is what most people have. It's active laziness that is the virtue. It's the desire to go out and / make sure/ that you can be lazy in the future by spending just a little time writing a script now.

Re: Python editor/IDE on Linux?

2007-04-15 Thread Daniel Gee
didn't know that one. Perhaps I'll look into Gvim (I still like to cut and paste with the mouse, even if I left that off my list). -- http://mail.python.org/mailman/listinfo/python-list