[Tutor] widget value initialization

2007-11-16 Thread kuiper
Radiobuttons and entries in child windows do not display their initial state. Try the attached example. (Notice some attempted remedies commented out because they didn't work.) If anyone can make this work I'd be very grateful. Regards Tom Kuiper #!/usr/bin/python # This is an extension

[Tutor] Guest at Foothill College?

2007-11-16 Thread Elaine
Would you be able to come talk to beginning Python students at Foothill College, Middlefield campus in Palo Alto? The students are working on a real world project and can really benefit from a guest from industry who can critique their work and answer questions about your career. You wo

[Tutor] affecting all classes if one class is affected by an event - pygame

2007-11-16 Thread ted b
I am trying to figure out how to make a class instance respond the same way as another class instance if the other is affected by some event. I have been playing around with inheritance, and have tried other stuff, but i am somewhat of a newbie and I have been having difficulty (but you guys, parti

Re: [Tutor] affecting all classes if one class is affected by an event - pygame

2007-11-16 Thread Kent Johnson
ted b wrote: > I am trying to figure out how to make a class instance > respond the same way as another class instance if the > other is affected by some event. I have been playing > around with inheritance, and have tried other stuff, > but i am somewhat of a newbie and I have been having > diffic

[Tutor] Read-ahead for large fixed-width binary files?

2007-11-16 Thread Marc Tompkins
I've been writing a lot of utility programs for my clients who are users of a certain legacy database application - exporting, reporting, pretty label printing, etc. The database is normalized into 45 files, each of which contains fixed-length records (ranging from 80 bytes to 1024). A few of tho

Re: [Tutor] Read-ahead for large fixed-width binary files?

2007-11-16 Thread Marc Tompkins
OK, I feel quite foolish... almost immediately after hitting 'send' I realized I can implement this myself, using 'read(bigsize)' - currently I'm using 'read(recordsize)'; I just need to add an extra loop around my record reads. Please disregard... On Nov 16, 2007 11:10 AM, Marc Tompkins <[EMAIL

[Tutor] Q1: Any way for script to intercept a HUP signal ?

2007-11-16 Thread dave selby
Is there a way for a Python script to intercept a HUP signal sent to it ? Cheers Dave -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html ___ Tutor maillist - Tutor@python.org http:/

Re: [Tutor] Q1: Any way for script to intercept a HUP signal ?

2007-11-16 Thread Eric Brunson
dave selby wrote: > Is there a way for a Python script to intercept a HUP signal sent to it ? > > Cheers > > Dave > > Yes, using a signal handler: http://docs.python.org/lib/module-signal.html Let us know if you need clarification on anything after you read the section. _

Re: [Tutor] Q2: logging not working as expected

2007-11-16 Thread Eric Brunson
I can't get the python 2.5.1 logging module to use your logging.conf, can you create a simpler example? dave selby wrote: > I am trying to use the python logging module. At first glance it looks > pretty complicated but having Ggooled a lot I have come up with a > trial script of ... > > loggin

Re: [Tutor] Q2: logging not working as expected

2007-11-16 Thread Eric Brunson
Kent Johnson wrote: > dave selby wrote: > >> I was trying to get logging to report to Syslog, that failed so I >> changed it to write to a file 'python.log' . When I execute my test >> script 'python.log' appears but contains no messages and no error >> messages are generated. >> >> Anybody any

Re: [Tutor] Q2: logging not working as expected

2007-11-16 Thread Kent Johnson
dave selby wrote: > I was trying to get logging to report to Syslog, that failed so I > changed it to write to a file 'python.log' . When I execute my test > script 'python.log' appears but contains no messages and no error > messages are generated. > > Anybody any ideas as to what I am doing wro

[Tutor] Q2: logging not working as expected

2007-11-16 Thread dave selby
I am trying to use the python logging module. At first glance it looks pretty complicated but having Ggooled a lot I have come up with a trial script of ... logging.config.fileConfig("logging.conf") logger = logging.getLogger() logger.critical("Test Message") Where 'loggin.conf' contains ... [l

Re: [Tutor] Q2: logging not working as expected

2007-11-16 Thread jay
Dave, Fix your typo here > [loggers] > keys=root,hdk1,hkd2 Should be hkd1 I believe, otherwise the config file is rejected by the logging module. > args=(('localhost', handlers.SYSLOG_UDP_PORT), > handlers.SysLogHandler.LOG_USER) LOG_USER is not a defined priority by default in syslog, unless

Re: [Tutor] selecting elements from a list that do not meet selection criteria

2007-11-16 Thread Ricardo Aráoz
ted b wrote: > Is there a way i can select all elements from a list > that do not meet selection criteria. I want to be able > to select elements that have values of, say, < 1 but > only if at least one of the elements has a value of > > 0. > > What i mean is, for example, in the code below, if on

Re: [Tutor] affecting all classes if one class is affected by an event - pygame

2007-11-16 Thread Marc Tompkins
Thus spake ted b: I am trying to figure out how to make a class instance respond the same way > as another class instance if the other is affected by some event. I have > been playing around with inheritance, and have tried other stuff, but i am > somewhat of a newbie and I have been having diffic

Re: [Tutor] Memory consumption question

2007-11-16 Thread Tiger12506
> OK, the analogy is cute, but I really don't know what it means in > Python. Can you give an example? What are the parts of an old-style > class that have to be 'ordered' separately? How do you 'order' them > concisely with a new-style class? > > Thanks, > Kent He is setting up the analogy so tha

Re: [Tutor] Read-ahead for large fixed-width binary files?

2007-11-16 Thread Alan Gauld
"Marc Tompkins" <[EMAIL PROTECTED]> wrote > realized I can implement this myself, using 'read(bigsize)' - > currently I'm using 'read(recordsize)'; I just need to add an extra > loop around my record reads. Please disregard... If you just want to navigate to a specific record then it might be

[Tutor] repeat

2007-11-16 Thread Michael
Hi All This has probably been asked before but can I get some clarification on why Python does not have a repeat...until statement, and does that mean repeat...until is bad practice? I was trying to get Python on the standard langauge list for my state secondary school system but they say a la