Re: [Tutor] pyqt4 set horizontal header item - solved

2013-04-01 Thread eryksun
On Sun, Mar 31, 2013 at 8:13 PM, Phil wrote: > > I have the answer (provided by a member of another list) and I was correct, > it was something basic. > > from PyQt4 import QtGui > QtGui.QTable etc Sorry, I assumed you were familiar with the package layout. http://pyqt.sourceforge.net/Docs/PyQt4

Re: [Tutor] pyqt4 set horizontal header item - solved

2013-04-01 Thread Phil
On 01/04/13 19:47, eryksun wrote: On Sun, Mar 31, 2013 at 8:13 PM, Phil wrote: I have the answer (provided by a member of another list) and I was correct, it was something basic. from PyQt4 import QtGui QtGui.QTable etc Sorry, I assumed you were familiar with the package layout. http://pyq

[Tutor] tadaahh! But how to identify zLinux?

2013-04-01 Thread Albert-Jan Roskam
tadaah, I uploaded my first package some time ago: http://pypi.python.org/pypi/savReaderWriter Let me use this opportunity to say THANKS to all of you for all your advise! I'm still stuck with a question though. The program is supposed to work with zLinux (IBM system Z). But how do I know that t

Re: [Tutor] tadaahh! But how to identify zLinux?

2013-04-01 Thread eryksun
On Mon, Apr 1, 2013 at 4:04 PM, Albert-Jan Roskam wrote: > > I'm still stuck with a question though. The program is supposed to work > with zLinux (IBM system Z). But how do I know that this system is used? Have a look at the platform module for info on the Python version/implementation, machine,

Re: [Tutor] tadaahh! But how to identify zLinux?

2013-04-01 Thread Alan Gauld
On 01/04/13 21:04, Albert-Jan Roskam wrote: program is supposed to work with zLinux (IBM system Z). But how do I > know that this system is used? I have no idea what the answer is but I'm curious why you would care? Are you expecting that your code will be run on an IBM mainframe? I'd have th

Re: [Tutor] tadaahh! But how to identify zLinux?

2013-04-01 Thread Steven D'Aprano
On 02/04/13 09:00, Alan Gauld wrote: On 01/04/13 21:04, Albert-Jan Roskam wrote: program is supposed to work with zLinux (IBM system Z). But how do I know that this system is used? I have no idea what the answer is but I'm curious why you would care? Are you expecting that your code will be r

[Tutor] argparse iterable

2013-04-01 Thread kendy
Dear Tutor I want to compare command line options, to options in a dictionary from a YAML file. The command line will over-ride the options in my file. (The YAML file, and its dictionary are not shown. That part works.) My distilled code:

Re: [Tutor] argparse iterable

2013-04-01 Thread Jason Friedman
#!/usr/bin/python import argparse parser = argparse.ArgumentParser(description='Short sample app') parser.add_argument('-a', action="store_true", default=False) parser.add_argument('-b', action="store", dest="b") parser.add_argument('-c', action="store", dest="c", type=int) parser.parse_args() for

Re: [Tutor] argparse iterable

2013-04-01 Thread Mark Lawrence
On 02/04/2013 01:31, ke...@kendy.org wrote: Dear Tutor I want to compare command line options, to options in a dictionary from a YAML file. The command line will over-ride the options in my file. (The YAML file, and its dictionary are not shown. That part works.) My distilled code: --

Re: [Tutor] argparse iterable

2013-04-01 Thread Dave Angel
On 04/01/2013 09:31 PM, Mark Lawrence wrote: On 02/04/2013 01:31, ke...@kendy.org wrote: Dear Tutor I want to compare command line options, to options in a dictionary from a YAML file. The command line will over-ride the options in my file. (The YAML file, and its dictionary are not shown. That

Re: [Tutor] argparse iterable

2013-04-01 Thread Don Jennings
On Apr 1, 2013, at 8:31 PM, wrote: > > > print("But this doesn't iter through a b and c:") > for k,v in parser.parse_args(): >print('This arg is %s %s' % k, k[str(v)]) > $ > - > > My error: > $ h.py -a -b hi -c 42 >

Re: [Tutor] argparse iterable

2013-04-01 Thread kendy
You guys are awesome! You make it look easy and I learn every time. Thank you Ken ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] argparse iterable

2013-04-01 Thread Mark Lawrence
On 02/04/2013 02:37, Dave Angel wrote: On 04/01/2013 09:31 PM, Mark Lawrence wrote: for a in vars(parser.parse_args()): print('This arg is %s' % a) http://docs.python.org/3/library/argparse.html#the-namespace-object Please don't ask me for an explanation as it took me long enough to work

Re: [Tutor] argparse iterable

2013-04-01 Thread Mark Lawrence
On 02/04/2013 03:28, ke...@kendy.org wrote: You guys are awesome! You make it look easy and I learn every time. Thank you Ken Think yourself lucky, I'm currently on the wagon or it'd cost you a couple of pints :) -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/G

Re: [Tutor] tadaahh! But how to identify zLinux?

2013-04-01 Thread eryksun
On Mon, Apr 1, 2013 at 6:42 PM, Steven D'Aprano wrote: > By the way, I don't know that changing directory is a good idea, if you can > avoid it at all. As far as loading linked libraries goes, changing the current directory works on Windows, and I think OS X, but it doesn't work on Linux. On Wind