[Tutor] glade gtk radiobutton group

2010-06-06 Thread Lang Hurst
I'm trying to create an incredibly simple application just to learn gui programming, but I can't see how to work with radio buttons. A sample from my glade looks like: Ch 1 True True False

[Tutor] Regular expression grouping insert thingy

2010-06-08 Thread Lang Hurst
This is so trivial (or should be), but I can't figure it out. I'm trying to do what in vim is :s/\([0-9]\)x/\1*x/ That is, "find a number followed by an x and put a "*" in between the number and the x" So, if the string is "6443x - 3", I'll get back "6443*x - 3" I won't write down all the t

Re: [Tutor] Regular expression grouping insert thingy

2010-06-08 Thread Lang Hurst
x27;t make sense; refrigerator? On Tue, Jun 8, 2010 at 10:11 PM, Lang Hurst <mailto:l...@tharin.com>> wrote: This is so trivial (or should be), but I can't figure it out. I'm trying to do what in vim is :s/\([0-9]\)x/\1*x/ That is, "find a number follow

[Tutor] Structuring a class

2010-06-14 Thread Lang Hurst
I'm trying to figure out how to deal with data which will look something like: Student:Bob Hurley ID: 123456 Period:4 Grad_class: 2012 Credits: Algebra C (20P) Chapter 1 Date: September 14, 2010 Grade: 87 Credits

Re: [Tutor] Structuring a class

2010-06-14 Thread Lang Hurst
bob gailer wrote: Often a case like this is better handled using a relational database. Python happens to come with the sqlite3 module which makes database work quite easy. You should define a class for Credit, which will hold the credit attributes, just like you did for Student. Th

[Tutor] sqlite3 select extra characters

2010-06-17 Thread Lang Hurst
Is there a way to just return the values when using sqlite3? If I: names = c.execute('select names from students') for name in names: print names I get the list I want, but they look like (u'Cleese, John') (u'Jones, Terry') (u'Gillaim, Terry') is there a way to just return Cleese, John

Re: [Tutor] sqlite3 select extra characters

2010-06-18 Thread Lang Hurst
Thanks. Alan Gauld wrote: "Lang Hurst" wrote Is there a way to just return the values when using sqlite3? I don't think so, select returns a tuple of values, even if there is only one value. I get the list I want, but they look like (u'Cleese, John') is t

Re: [Tutor] sqlite3 select extra characters

2010-06-18 Thread Lang Hurst
Steven D'Aprano wrote: On Fri, 18 Jun 2010 03:54:05 pm Lang Hurst wrote: Is there a way to just return the values when using sqlite3? If I: names = c.execute('select names from students') for name in names: print names What is c? A Cursor or a Connection obje

[Tutor] Python glade

2010-06-18 Thread Lang Hurst
OK, I created a UI in glade which has the following: True True ● 25 basically, a text box. I'm trying to set it up to automatically complete names as I type. My py fil

Re: [Tutor] Python glade

2010-06-18 Thread Lang Hurst
Found the problem. If you want to do this, you have to access the gtkEntry like this self.builder.get_object('student_change').set_completion(completion) instead of self.student_change.set_completion(completion) Lang Hurst wrote: OK, I created a UI in glade whi

[Tutor] How to add extra Vbox fields dynamically

2010-06-19 Thread Lang Hurst
I hope that I'm asking this in the right place. I don't have too much trouble hacking together command line stuff, but the GUI part is a struggle for me. I created a UI in glade. It has a couple of Vboxes for information. The final box is filled with a TextView. In my program, I'm connecti

Re: [Tutor] How to add extra Vbox fields dynamically

2010-06-19 Thread Lang Hurst
right for some reason. Lang Hurst wrote: I hope that I'm asking this in the right place. I don't have too much trouble hacking together command line stuff, but the GUI part is a struggle for me. I created a UI in glade. It has a couple of Vboxes for information. The final box

Re: [Tutor] How to add extra Vbox fields dynamically

2010-06-20 Thread Lang Hurst
OK, figured that was probably bad etiquette, but there doesn't seem to be close to the same traffic. Mea culpa. I won't do it again. I think most of my issues have to do with the gtk part, so I'll post there for the most part. Thanks. Timo wrote: On 20-06-10 04:04, Lang

Re: [Tutor] Reading Excel Files

2010-06-22 Thread Lang Hurst
Carlos Daniel Ruvalcaba Valenzuela wrote: Hello list, I was wondering if anyone has worked with excel 2007 files (importing data from), I have done so for old format (xls) via a number of modules like xlrd and the old pyexcelerator, however none of those packages currently support new 2007 forma

Re: [Tutor] Fwd: HELP!

2010-06-28 Thread Lang Hurst
On 06/28/2010 01:36 PM, Chris wrote: My friend jacob had a question. I can't really answer it, but you guys can. Send you replies to him not me. Oh, and jacob, I'm forwarding you message to the Python Mailing list. Chris, I tried the py2exe thing again, but things are getting confusing... It

[Tutor] togglebutton mouseover

2010-06-30 Thread Lang Hurst
Is there a way to make a ToggleButton not change state when moused over? I set the color of the button when clicked with a line like so: widget.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse("light blue")) That works fine. On and off. Although you can't tell it's clicked until the mouse pa

Re: [Tutor] togglebutton mouseover

2010-06-30 Thread Lang Hurst
Sorry, I just realized I posted this to the wrong list. On 06/30/2010 12:20 AM, Lang Hurst wrote: Is there a way to make a ToggleButton not change state when moused over? I set the color of the button when clicked with a line like so: widget.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse

[Tutor] Strange sqlite3 behavior

2010-07-17 Thread Lang Hurst
I just had the weirdest issue with sqlite3. I was trying to update a field to "Active". I have a little database of students and sometimes they get sent to juvi, or just check out for a couple of months and show back up. Anyway, I wanted to just have a field that had either "Active" or "Inac

Re: [Tutor] Strange sqlite3 behavior

2010-07-17 Thread Lang Hurst
On 07/17/2010 02:04 AM, Tim Golden wrote: On 17/07/2010 8:10 AM, Lang Hurst wrote: I just had the weirdest issue with sqlite3. I was trying to update a field to "Active". I have a little database of students and sometimes they get sent to juvi, or just check out for a couple of

Re: [Tutor] attachments?

2010-07-21 Thread Lang Hurst
Naw, didn't come through. On 07/21/2010 08:08 PM, Alex Hall wrote: -- There are no stupid questions, just stupid people. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tut

[Tutor] os.startfile

2010-12-19 Thread Lang Hurst
I have the following in my program: try: os.startfile('current_credit.txt') except: os.system('/usr/bin/xdg-open current_credit.txt') Basically, open a file in notepad if I'm on windows, vim if on my home linux computer. It works fine in linux and in W

Re: [Tutor] os.startfile

2010-12-19 Thread Lang Hurst
On 12/19/2010 01:16 PM, Steven D'Aprano wrote: Lang Hurst wrote: I have the following in my program: try: os.startfile('current_credit.txt') except: os.system('/usr/bin/xdg-open current_credit.txt') Basically, open a file in