default value in a list

2005-01-21 Thread TB
Hi,

Is there an elegant way to assign to a list from a list of unknown
size?  For example, how could you do something like:

>>>  a, b, c = (line.split(':'))
if line could have less than three fields?

Thanks,
TB

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: default value in a list

2005-01-24 Thread TB
Thanks very much for all the responses.  They were useful to me and
I'll probably refer back to them again in the future.

TB

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: solutions manual, test bank for Industrial Organizational Psychology 4e Paul Levy, contact direct by email at studentshelp(at)hotmail(dot)com

2017-11-06 Thread tb . sm . text


for any test bank or solutions manual please contact :tbsmtext(at)gmail(dot)com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: solutions manual, test bank for Psychological Testing Principles, Applications, and Issues, 9e Robert Kaplan, Dennis Saccuzzo, contact direct by email at studentshelp(at)hotmail(dot)com

2017-11-06 Thread tb . sm . text
for any test bank or solutions manual please contact :tbsmtext(at)gmail(dot)com
-- 
https://mail.python.org/mailman/listinfo/python-list


Using PyQT and OpenGL

2006-07-26 Thread Peter TB Brett

Hi folks,

Although the PyQt documentation indicates that QGLWidget & friends have
been ported to Python for the PyQt bindings, I'm not entirely sure what's
necessary to make the normal OpenGL/GLUT interface available.

Does PyQt work okay with PyOpenGL?  Or is a more complicated workaround
needed?

If anyone has experience with working with Python/Qt/OpenGL and can offer
any advice I'd much appreciate it.

Thanks,

Peter

-- 
Quake II build tools maintainer http://tinyurl.com/fkldd

v2sw6YShw7$ln5pr6ck3ma8u6/8Lw3+2m0l7Ci6e4+8t4Eb8Aen5+6g6Pa2Xs5MSr5p4
  hackerkey.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Detecting window focus events in PyGTK

2006-08-28 Thread Peter TB Brett
Hi folks,

I'm currently trying to work out how to detect when a PyGTK window
receives the focus from the window manager -- I assume that it must
receive some kind of X event, but I can't work out which signal it
generates. Searching around the subject on the web doesn't seem to pull up
anything useful.

I tried the "focus" signal, but that doesn't work the way I'd like it
to. For example, the following code only prints the message "Received
focus!" once (immediately after startup) even when it _isn't_ the active
window.


#!/usr/bin/env python
import pygtk
pygtk.require('2.0')

import gtk

def event_focus(widget, direction):
print "Received focus!"

window = gtk.Window()
window.set_size_request(100, 100)
window.connect("focus", event_focus)
window.show_all()
gtk.main()


I suspect that I'm hacking in the wrong place, so any hints or tips much
appreciated!

Thanks,

Peter

-- 
v2sw6YShw7$ln5pr6ck3ma8u6/8Lw3+2m0l7Ci6e4+8t4Eb8Aen5+6g6Pa2Xs5MSr5p4
  hackerkey.com

-- 
http://mail.python.org/mailman/listinfo/python-list